Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Fitch DrFitch

🎯
Focusing
View GitHub Profile
@DrFitch
DrFitch / auth.guard.ts
Created Feb 18, 2018 — forked from codediodeio/auth.guard.ts
Angular Firebase Router Guard with Browser Refresh
View auth.guard.ts
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { AngularFireAuth } from 'angularfire2/auth';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/take';
@Injectable()
export class AuthGuard implements CanActivate {
You can’t perform that action at this time.