16 lines
437 B
TypeScript
16 lines
437 B
TypeScript
import { Router, CanActivate } from '@angular/router';
|
|
import { Injectable } from '@angular/core';
|
|
import { OAuthService } from 'angular-oauth2-oidc';
|
|
import { } from '@angular/router';
|
|
|
|
@Injectable()
|
|
export class AuthCallbackGuard implements CanActivate {
|
|
|
|
constructor(private router$: Router,private oauthService$:OAuthService) {}
|
|
|
|
canActivate() {
|
|
this.router$.navigateByUrl(this.oauthService$.state);
|
|
return false;
|
|
}
|
|
}
|