1 | import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
|
2 | import { Observable, UnaryFunction } from 'rxjs';
|
3 | import { Auth } from '@angular/fire/auth';
|
4 | import { User } from 'firebase/auth';
|
5 | import * as i0 from "@angular/core";
|
6 | export declare type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;
|
7 | export declare type AuthPipe = UnaryFunction<Observable<User | null>, Observable<boolean | string | any[]>>;
|
8 | export declare const loggedIn: AuthPipe;
|
9 | export declare class AuthGuard implements CanActivate {
|
10 | private router;
|
11 | private auth;
|
12 | constructor(router: Router, auth: Auth);
|
13 | canActivate: (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Observable<boolean | import("@angular/router").UrlTree>;
|
14 | static ɵfac: i0.ɵɵFactoryDeclaration<AuthGuard, never>;
|
15 | static ɵprov: i0.ɵɵInjectableDeclaration<AuthGuard>;
|
16 | }
|
17 | export declare const canActivate: (pipe: AuthPipeGenerator) => {
|
18 | canActivate: (typeof AuthGuard)[];
|
19 | data: {
|
20 | authGuardPipe: AuthPipeGenerator;
|
21 | };
|
22 | };
|
23 | export declare const isNotAnonymous: AuthPipe;
|
24 | export declare const idTokenResult: import("rxjs").OperatorFunction<User, any>;
|
25 | export declare const emailVerified: AuthPipe;
|
26 | export declare const customClaims: UnaryFunction<Observable<User>, Observable<any>>;
|
27 | export declare const hasCustomClaim: (claim: string) => AuthPipe;
|
28 | export declare const redirectUnauthorizedTo: (redirect: string | any[]) => AuthPipe;
|
29 | export declare const redirectLoggedInTo: (redirect: string | any[]) => AuthPipe;
|