WIP #216. The timing is not good. After user password is confirmed, the isLoggedIn boolean is still false, and thus causing the website to stay at the login page

This commit is contained in:
Cindy Chang
2024-06-14 16:17:20 +08:00
parent 8d34b80b5c
commit 5bf98a1b74
3 changed files with 22 additions and 3 deletions

View File

@@ -45,7 +45,8 @@ export default defineStore('loginStore', {
// 然而有一種情況是使用者在沒有登入的情況下貼上了某一個頁面的網址,
// 則在此情況下時,我們會在使用者稍後登入後,把使用者帶到剛才記住的 return-to 網址
if(this.rememberedReturnToUrl !== "") {
window.location.href = atob(this.rememberedReturnToUrl);
const decodedUrl = atob(this.rememberedReturnToUrl);
window.location.href = decodedUrl;
} else {
this.$router.push('/files');
}