MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / toPublicUser

Function toPublicUser

apps/api/src/api/auth/auth.utils.ts:7–13  ·  view source on GitHub ↗
(user: IUser)

Source from the content-addressed store, hash-verified

5import type { IPublicUser } from "./auth.types";
6
7export const toPublicUser = (user: IUser): IPublicUser => ({
8 id: user.id,
9 email: user.email,
10 firstName: user.firstName,
11 lastName: user.lastName,
12 emailVerified: user.emailVerifiedAt !== null,
13});
14
15/**
16 * Resolves the active account for JWT issuance. Picks the user's

Callers 8

loginMethod · 0.90
refreshMethod · 0.90
verifyTotpLoginMethod · 0.90
verifyRecoveryLoginMethod · 0.90
verifyMethod · 0.90
forceVerifyForTestsMethod · 0.90
auth.utils.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected