mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 23:36:37 +08:00
refreshing after authentication changes. closes #2438
This commit is contained in:
parent
73c5b291d8
commit
c4e62dddfb
|
@ -869,8 +869,11 @@ $(".pageSettings #passPasswordAuth").on("click", (e) => {
|
|||
SimplePopups.list.updatePassword.show();
|
||||
});
|
||||
|
||||
$(".pageSettings #addGoogleAuth").on("click", (e) => {
|
||||
AccountController.addGoogleAuth();
|
||||
$(".pageSettings #addGoogleAuth").on("click", async (e) => {
|
||||
await AccountController.addGoogleAuth();
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
$(".pageSettings #removeGoogleAuth").on("click", (e) => {
|
||||
|
|
|
@ -231,6 +231,9 @@ list.updateEmail = new SimplePopup(
|
|||
return;
|
||||
} else {
|
||||
Notifications.add("Email updated", 1);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e.code == "auth/wrong-password") {
|
||||
|
@ -372,6 +375,9 @@ list.updatePassword = new SimplePopup(
|
|||
await user.updatePassword(newPass);
|
||||
Loader.hide();
|
||||
Notifications.add("Password updated", 1);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
} catch (e) {
|
||||
Loader.hide();
|
||||
if (e.code == "auth/wrong-password") {
|
||||
|
@ -430,7 +436,10 @@ list.addPasswordAuth = new SimplePopup(
|
|||
return;
|
||||
}
|
||||
|
||||
AccountController.addPasswordAuth(email, pass);
|
||||
await AccountController.addPasswordAuth(email, pass);
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 1000);
|
||||
},
|
||||
() => {}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue