MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / createAuth

Function createAuth

packages/factory/src/create/auth.ts:15–31  ·  view source on GitHub ↗
(options?: Partial<auths>)

Source from the content-addressed store, hash-verified

13}
14
15export default function createAuth(options?: Partial<auths>): Promise<auths> {
16 const password = options?.password || 'password';
17 const salt = generateSalt();
18 const hash = generateHash(password, salt);
19 const data = {
20 email: `${randomUUID()}@${randomUUID()}.com`,
21 token: 'token',
22 password: '',
23 salt: '',
24 ...options,
25 };
26 data.password = hash;
27 data.salt = salt;
28 return prisma.auths.create({
29 data,
30 });
31}

Callers 5

private.test.tsFile · 0.90
index.test.tsFile · 0.90
createUserAndSignInFunction · 0.90
createFunction · 0.85

Calls 3

generateSaltFunction · 0.70
generateHashFunction · 0.70
createMethod · 0.45

Tested by 1

createUserAndSignInFunction · 0.72