({
email,
password,
turnstileToken,
}: {
email: string;
password: string;
turnstileToken?: string;
})
| 88 | }; |
| 89 | |
| 90 | export 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 | |
| 111 | export const betterAuthSignUp = async ({ |
| 112 | name, |
no test coverage detected