Added logout functionality with CIAM
This commit is contained in:
@@ -2,6 +2,7 @@ export interface Environment {
|
||||
environment: 'api' | 'local' | 'prod';
|
||||
clientId: string;
|
||||
loginUrl: string;
|
||||
logoutUrl: string;
|
||||
production: boolean;
|
||||
api: {
|
||||
url: string;
|
||||
|
||||
@@ -81,5 +81,9 @@ export class AuthenticationService {
|
||||
logout(): void {
|
||||
localStorage.removeItem('id_token');
|
||||
localStorage.removeItem('expires_at');
|
||||
|
||||
if (environment.environment !== 'local') {
|
||||
document.location.href = environment.logoutUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user