fix: Update Discord login handling to use async/await for better error handling
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@@ -59,14 +59,16 @@
|
||||
const accessToken = params.get("access_token");
|
||||
|
||||
if (accessToken) {
|
||||
let auth = $authV2Repo.loginDiscord(accessToken);
|
||||
if (!auth) {
|
||||
pw = "";
|
||||
error = t("login.error");
|
||||
return;
|
||||
}
|
||||
(async () => {
|
||||
let auth = await $authV2Repo.loginDiscord(accessToken);
|
||||
if (!auth) {
|
||||
pw = "";
|
||||
error = t("login.error");
|
||||
return;
|
||||
}
|
||||
|
||||
navigate(l("/dashboard"));
|
||||
navigate(l("/dashboard"));
|
||||
})();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user