MCPcopy Create free account
hub / github.com/dailydotdev/apps / betterAuthSignIn

Function betterAuthSignIn

packages/shared/src/lib/betterAuth.ts:90–109  ·  view source on GitHub ↗
({
  email,
  password,
  turnstileToken,
}: {
  email: string;
  password: string;
  turnstileToken?: string;
})

Source from the content-addressed store, hash-verified

88};
89
90export const betterAuthSignIn = async ({
91 email,
92 password,
93 turnstileToken,
94}: {
95 email: string;
96 password: string;
97 turnstileToken?: string;
98}): Promise<BetterAuthResponse> => {
99 const headers: Record<string, string> = {};
100 if (turnstileToken) {
101 headers['x-captcha-response'] = turnstileToken;
102 }
103 return betterAuthPost(
104 'sign-in/email',
105 { email, password },
106 'Sign in failed',
107 Object.keys(headers).length > 0 ? headers : undefined,
108 );
109};
110
111export const betterAuthSignUp = async ({
112 name,

Callers 2

betterAuth.spec.tsFile · 0.90
useLoginFunction · 0.90

Calls 1

betterAuthPostFunction · 0.85

Tested by

no test coverage detected