Fix Bug 60353 - Accounts: Sign Up. Portal registration fails. (@self.json 401)
This commit is contained in:
parent
61607973ae
commit
8cf3f74aff
@ -53,14 +53,15 @@ class AuthStore {
|
||||
|
||||
this.skipRequest = skipRequest;
|
||||
|
||||
try {
|
||||
await this.userStore.init();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
await this.settingsStore.init();
|
||||
|
||||
const requests = [];
|
||||
requests.push(this.settingsStore.init());
|
||||
|
||||
if (this.settingsStore.isLoaded && this.settingsStore.socketUrl) {
|
||||
requests.push(this.userStore.init());
|
||||
} else {
|
||||
this.userStore.setIsLoaded(true);
|
||||
}
|
||||
|
||||
if (this.isAuthenticated && !skipRequest) {
|
||||
requests.push(
|
||||
@ -222,7 +223,7 @@ class AuthStore {
|
||||
|
||||
get isAuthenticated() {
|
||||
return (
|
||||
this.userStore.isAuthenticated ||
|
||||
(this.settingsStore.isLoaded && this.settingsStore.socketUrl) || //this.userStore.isAuthenticated ||
|
||||
this.settingsStore.tenantStatus === TenantStatus.PortalRestore
|
||||
);
|
||||
}
|
||||
|
@ -31,7 +31,11 @@ class UserStore {
|
||||
|
||||
this.setIsLoading(true);
|
||||
|
||||
try {
|
||||
await this.loadCurrentUser();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
this.setIsLoading(false);
|
||||
this.setIsLoaded(true);
|
||||
|
Loading…
Reference in New Issue
Block a user