Skip to content

Instantly share code, notes, and snippets.

View shinoshu's full-sized avatar
🍓
ねこちゃん

Shinozaki Shuma shinoshu

🍓
ねこちゃん
  • ねこちゃん
  • Tokyo, Japan
View GitHub Profile
@shinoshu
shinoshu / auth.guard.ts
Last active December 11, 2019 12:29 — forked from codediodeio/auth.guard.ts
Angular Firebase Router Guard with Browser Refresh
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { AngularFireAuth } from '@angular/fire/auth';
import { Observable } from 'rxjs';
import { tap, map, take } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})