Share refreshed credentials between tabs

This commit is contained in:
Michał Zieliński
2023-11-07 23:58:49 +01:00
parent 42acf08b8d
commit d333895c91
2 changed files with 2 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ export class AuthService {
this.user!.id = data.id;
this.apiToken = data.token;
this.apiTokenExpirationTime = moment(data.expirationTime);
this.sendAuthData();
resolve(data);
},
error: (e: HttpErrorResponse) => {

View File

@@ -61,6 +61,7 @@ export class LoginViewComponent implements OnInit {
try {
this.auth$.retrieveUserFromCredentials(response.credential);
this.auth$.webCredentials = response.credential;
this.auth$.sendAuthData();
this.ngZone$.run(() => {
this.loading = true;
});