mirror of
https://github.com/BradNut/example-sveltekit-email-password-webauthn
synced 2025-09-08 17:40:27 +00:00
update password update
This commit is contained in:
parent
62b7bb2a44
commit
76276f5fb6
1 changed files with 1 additions and 7 deletions
|
|
@ -68,13 +68,6 @@ async function updatePasswordAction(event: RequestEvent) {
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!event.locals.user.emailVerified) {
|
||||
return fail(403, {
|
||||
password: {
|
||||
message: "Forbidden"
|
||||
}
|
||||
});
|
||||
}
|
||||
if (event.locals.user.registered2FA && !event.locals.session.twoFactorVerified) {
|
||||
return fail(403, {
|
||||
password: {
|
||||
|
|
@ -125,6 +118,7 @@ async function updatePasswordAction(event: RequestEvent) {
|
|||
}
|
||||
});
|
||||
}
|
||||
passwordUpdateBucket.reset(event.locals.session.id);
|
||||
invalidateUserSessions(event.locals.user.id);
|
||||
await updateUserPassword(event.locals.user.id, newPassword);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue