refactor(core): remove unnecessary injected service

pull/1898/head
mehmet-erim 5 years ago
parent edea62e938
commit 2d3645843c

@ -1,15 +1,13 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree, Router } from '@angular/router';
import { Store } from '@ngxs/store';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import { OAuthService } from 'angular-oauth2-oidc';
import { Observable } from 'rxjs';
import { Navigate } from '@ngxs/router-plugin';
@Injectable({
providedIn: 'root',
})
export class AuthGuard implements CanActivate {
constructor(private oauthService: OAuthService, private store: Store, private router: Router) {}
constructor(private oauthService: OAuthService, private router: Router) {}
canActivate(_: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean | UrlTree {
const hasValidAccessToken = this.oauthService.hasValidAccessToken();

Loading…
Cancel
Save