mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
Merge branch 'main' of https://gitee.com/dromara/MaxKey
This commit is contained in:
commit
407a393367
@ -45,6 +45,9 @@ export class LogoutComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.redirect_uri = this.route.snapshot.params[CONSTS.REDIRECT_URI];
|
||||
if (this.redirect_uri == null || this.redirect_uri == '') {
|
||||
this.redirect_uri = this.route.snapshot.queryParams[CONSTS.REDIRECT_URI];
|
||||
}
|
||||
this.authnService
|
||||
.logout()
|
||||
.pipe(
|
||||
@ -52,9 +55,13 @@ export class LogoutComponent implements OnInit {
|
||||
this.tokenService.clear();
|
||||
if (this.redirect_uri == null || this.redirect_uri == '') {
|
||||
this.router.navigateByUrl(this.tokenService.login_url!);
|
||||
} else {
|
||||
if (this.redirect_uri.startsWith("http")){
|
||||
location.href = this.redirect_uri;
|
||||
} else {
|
||||
this.router.navigateByUrl(this.redirect_uri);
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
.subscribe(res => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user