mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
841 B
35 lines
841 B
/*
|
|
* Squidex Headless CMS
|
|
*
|
|
* @license
|
|
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
|
|
*/
|
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { Router } from '@angular/router';
|
|
|
|
import { AuthService } from '@app/shared';
|
|
|
|
@Component({
|
|
selector: 'sqx-logout',
|
|
template: ''
|
|
})
|
|
export class LogoutPageComponent implements OnInit {
|
|
constructor(
|
|
private readonly authService: AuthService,
|
|
private readonly router: Router
|
|
) {
|
|
}
|
|
|
|
public ngOnInit() {
|
|
this.authService.logoutRedirectComplete()
|
|
.subscribe(
|
|
() => {
|
|
this.router.navigate(['/'], { replaceUrl: true });
|
|
},
|
|
() => {
|
|
this.router.navigate(['/'], { replaceUrl: true });
|
|
}
|
|
);
|
|
}
|
|
}
|