- corretto problema ROGNOSO : Risolvere la questione "Sessioni multiple", se apro 2 browser l'ultimo va a cancellare il precedente, e mi da errore di email non valida !

Il problema era sulla fetch nel service worker, gestita in quel modo personalizzato, andava in conflitto, non tenendo le chiamate bloccanti, ma uscivano prima che arrivasse la risposta del server.
- Per chi è da tanto che non si collega a RISO, compare "Email non verificata"... (si risolve chiudendo su ESCI e riloggandosi)... però andrebbe sistemata.
(stesso problema di prima).
This commit is contained in:
Surya Paolo
2025-10-26 02:47:59 +02:00
parent eb0fb72c70
commit df98ec9471
64 changed files with 1286 additions and 704 deletions

View File

@@ -991,6 +991,7 @@ export const useUserStore = defineStore('UserStore', {
this.isLogged = false;
this.x_auth_token = '';
this.refreshToken = '';
console.log('SBIANCA VUOTO ------------ x_auth_token');
return true;
},
@@ -1503,18 +1504,27 @@ export const useUserStore = defineStore('UserStore', {
});
},
UpdatePwd(x_auth_token: string, refreshToken: string) {
updatePwd(x_auth_token: string, refreshToken: string) {
this.x_auth_token = x_auth_token;
console.log('SET ------------ x_auth_token', x_auth_token);
this.refreshToken = refreshToken;
if (!this.my.tokens) {
this.my.tokens = [];
}
this.my.tokens.push({
const newToken = {
access: 'auth',
token: x_auth_token,
refreshToken,
data_login: tools.getDateNow(),
});
};
const index = this.my.tokens.findIndex((token) => token.access === 'auth' && token.token === x_auth_token);
if (index === -1) {
this.my.tokens.push(newToken);
} else {
this.my.tokens[index] = newToken;
}
},
setServerCode(num: number) {
@@ -1695,7 +1705,7 @@ export const useUserStore = defineStore('UserStore', {
tools.checkApp();
return Api.SendReq('/users/me/token', 'DELETE', null)
return await Api.SendReq('/users/me/token', 'DELETE', null)
.then((res) => {
console.log(res);
})