File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
auth/src/platform_browser Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -43,17 +43,17 @@ const mintCookieFactory = (url: string) => async (user: User | null) => {
43
43
const idTokenAge =
44
44
idTokenResult &&
45
45
( new Date ( ) . getTime ( ) - Date . parse ( idTokenResult . issuedAtTime ) ) / 1_000 ;
46
- if ( idTokenAge && idTokenAge > authIdTokenMaxAge ) return ;
46
+ if ( idTokenAge && idTokenAge > authIdTokenMaxAge ) { return ; }
47
47
// Specifically trip null => undefined when logged out, to delete any existing cookie
48
48
const idToken = idTokenResult ?. token ;
49
- if ( lastPostedIdToken === idToken ) return ;
49
+ if ( lastPostedIdToken === idToken ) { return ; }
50
50
lastPostedIdToken = idToken ;
51
51
await fetch ( url , {
52
52
method : idToken ? 'POST' : 'DELETE' ,
53
53
headers : idToken
54
54
? {
55
- 'Authorization' : `Bearer ${ idToken } `
56
- }
55
+ 'Authorization' : `Bearer ${ idToken } `
56
+ }
57
57
: { }
58
58
} ) ;
59
59
} ;
@@ -86,7 +86,7 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
86
86
if ( authTokenSyncUrl ) {
87
87
const mintCookie = mintCookieFactory ( authTokenSyncUrl ) ;
88
88
beforeAuthStateChanged ( auth , mintCookie , ( ) => {
89
- mintCookie ( auth . currentUser ) ;
89
+ void mintCookie ( auth . currentUser ) ;
90
90
} ) ;
91
91
onIdTokenChanged ( auth , user => mintCookie ( user ) ) ;
92
92
}
Original file line number Diff line number Diff line change @@ -48,10 +48,11 @@ const getDefaultsFromEnvVariable = (): FirebaseDefaults | undefined => {
48
48
const jsonPath = process . env . __FIREBASE_DEFAULTS_PATH__ ;
49
49
if ( jsonPath && typeof require !== 'undefined' ) {
50
50
try {
51
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
51
52
const json = require ( jsonPath ) ;
52
53
return json ;
53
54
} catch ( e ) {
54
- `Unable to read defaults from file: ${ jsonPath } .` ;
55
+ console . warn ( `Unable to read defaults from file: ${ jsonPath } .` ) ;
55
56
}
56
57
}
57
58
} ;
You can’t perform that action at this time.
0 commit comments