( email: string, password: string, rememberMe: boolean, )
| 197 | } |
| 198 | |
| 199 | export async function signIn( |
| 200 | email: string, |
| 201 | password: string, |
| 202 | rememberMe: boolean, |
| 203 | ): Promise<AuthResult> { |
| 204 | if (!isAuthAvailable()) { |
| 205 | return { success: false, message: "Authentication uninitialized" }; |
| 206 | } |
| 207 | |
| 208 | const { error } = await tryCatch( |
| 209 | signInWithEmailAndPassword(email, password, rememberMe), |
| 210 | ); |
| 211 | |
| 212 | if (error !== null) { |
| 213 | return { success: false, message: error.message }; |
| 214 | } |
| 215 | return { success: true }; |
| 216 | } |
| 217 | |
| 218 | export async function signInWithProvider( |
| 219 | authMethod: AuthMethod, |
no test coverage detected