forked from mrwyndham/fastpocket
feature - tested email verification flow
This commit is contained in:
parent
bd6ca82bb3
commit
bde770bceb
|
@ -135,6 +135,9 @@ export async function login(formData: { email: string; password: string }) {
|
||||||
return { success: true, error: "Failed to log in", token: token, data: data };
|
return { success: true, error: "Failed to log in", token: token, data: data };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
if ((error as any).status == 403) {
|
||||||
|
await pb.collection('user').requestVerification(email);
|
||||||
|
}
|
||||||
return JSON.parse(JSON.stringify(error))
|
return JSON.parse(JSON.stringify(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue