mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-30 10:47:22 +08:00
signing out after user changed email
This commit is contained in:
parent
8597037845
commit
a0c5ade54d
1 changed files with 2 additions and 3 deletions
|
|
@ -300,6 +300,7 @@ list["updateEmail"] = new SimplePopup(
|
|||
async (_thisPopup, password, email, emailConfirm) => {
|
||||
try {
|
||||
const user = Auth?.currentUser;
|
||||
if (!Auth) return;
|
||||
if (!user) return;
|
||||
if (email !== emailConfirm) {
|
||||
Notifications.add("Emails don't match", 0);
|
||||
|
|
@ -325,9 +326,7 @@ list["updateEmail"] = new SimplePopup(
|
|||
}
|
||||
|
||||
Notifications.add("Email updated", 1);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 3000);
|
||||
AccountController.signOut();
|
||||
} catch (e) {
|
||||
const typedError = e as FirebaseError;
|
||||
if (typedError.code === "auth/wrong-password") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue