Only attempt once to use the autoLoginToken
This commit is contained in:
@@ -68,9 +68,9 @@ onMounted(async () => {
|
||||
// placed optionally in local storage by setupaccount.js
|
||||
const autoLoginToken = localStorage.cloudronFirstTimeToken;
|
||||
if (autoLoginToken) {
|
||||
localStorage.removeItem('cloudronFirstTimeToken');
|
||||
try {
|
||||
const res = await fetcher.post(submitUrl, { autoLoginToken });
|
||||
localStorage.removeItem('cloudronFirstTimeToken');
|
||||
|
||||
if (res.body.redirectTo) window.location.href = res.body.redirectTo;
|
||||
else console.log('login success but missing redirectTo in data:', res.body);
|
||||
|
||||
Reference in New Issue
Block a user