|
@ -87,7 +87,7 @@ export class HeaderComponent implements OnChanges { |
|
|
public openLoginDialog(): void { |
|
|
public openLoginDialog(): void { |
|
|
if(this.webAuthnService.isEnabled()){ |
|
|
if(this.webAuthnService.isEnabled()){ |
|
|
this.webAuthnService.verifyWebAuthn().subscribe(({ authToken }) => { |
|
|
this.webAuthnService.verifyWebAuthn().subscribe(({ authToken }) => { |
|
|
this.setToken(authToken); |
|
|
this.setToken(authToken, false); |
|
|
}); |
|
|
}); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -114,14 +114,14 @@ export class HeaderComponent implements OnChanges { |
|
|
takeUntil(this.unsubscribeSubject) |
|
|
takeUntil(this.unsubscribeSubject) |
|
|
) |
|
|
) |
|
|
.subscribe(({ authToken }) => { |
|
|
.subscribe(({ authToken }) => { |
|
|
this.setToken(authToken); |
|
|
this.setToken(authToken, data.staySignedIn); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public setToken(aToken: string) { |
|
|
public setToken(aToken: string, staySignedIn: boolean) { |
|
|
this.tokenStorageService.saveToken(aToken); |
|
|
this.tokenStorageService.saveToken(aToken, staySignedIn); |
|
|
|
|
|
|
|
|
this.router.navigate(['/']); |
|
|
this.router.navigate(['/']); |
|
|
} |
|
|
} |
|
|