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.
34 lines
859 B
34 lines
859 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({
|
|
next: () => {
|
|
this.router.navigate(['/'], { replaceUrl: true });
|
|
},
|
|
error: () => {
|
|
this.router.navigate(['/'], { replaceUrl: true });
|
|
},
|
|
});
|
|
}
|
|
}
|
|
|