File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ export const isNotAnonymous: AuthPipe = map(user => !!user && !user.isAnonymous)
6464export const idTokenResult = switchMap ( ( user : User | null ) => user ? user . getIdTokenResult ( ) : of ( null ) ) ;
6565export const emailVerified : AuthPipe = map ( user => ! ! user && user . emailVerified ) ;
6666export const customClaims = pipe ( idTokenResult , map ( idTokenResult => idTokenResult ? idTokenResult . claims : [ ] ) ) ;
67- export const hasCustomClaim = ( claim : string ) => pipe ( customClaims , map ( claims => claims . hasOwnProperty ( claim ) ) ) ;
68- export const redirectUnauthorizedTo = ( redirect : any [ ] ) => pipe ( loggedIn , map ( loggedIn => loggedIn || redirect ) ) ;
69- export const redirectLoggedInTo = ( redirect : any [ ] ) => pipe ( loggedIn , map ( loggedIn => loggedIn && redirect || true ) ) ;
67+ export const hasCustomClaim : ( claim : string ) => AuthPipe =
68+ ( claim ) => pipe ( customClaims , map ( claims => claims . hasOwnProperty ( claim ) ) ) ;
69+ export const redirectUnauthorizedTo : ( redirect : any [ ] ) => AuthPipe =
70+ ( redirect ) => pipe ( loggedIn , map ( loggedIn => loggedIn || redirect ) ) ;
71+ export const redirectLoggedInTo : ( redirect : any [ ] ) => AuthPipe =
72+ ( redirect ) => pipe ( loggedIn , map ( loggedIn => loggedIn && redirect || true ) ) ;
You can’t perform that action at this time.
0 commit comments