Share refreshed credentials between tabs
This commit is contained in:
@@ -64,6 +64,7 @@ export class AuthService {
|
|||||||
this.user!.id = data.id;
|
this.user!.id = data.id;
|
||||||
this.apiToken = data.token;
|
this.apiToken = data.token;
|
||||||
this.apiTokenExpirationTime = moment(data.expirationTime);
|
this.apiTokenExpirationTime = moment(data.expirationTime);
|
||||||
|
this.sendAuthData();
|
||||||
resolve(data);
|
resolve(data);
|
||||||
},
|
},
|
||||||
error: (e: HttpErrorResponse) => {
|
error: (e: HttpErrorResponse) => {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export class LoginViewComponent implements OnInit {
|
|||||||
try {
|
try {
|
||||||
this.auth$.retrieveUserFromCredentials(response.credential);
|
this.auth$.retrieveUserFromCredentials(response.credential);
|
||||||
this.auth$.webCredentials = response.credential;
|
this.auth$.webCredentials = response.credential;
|
||||||
|
this.auth$.sendAuthData();
|
||||||
this.ngZone$.run(() => {
|
this.ngZone$.run(() => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user