Skip to content

Commit 3dab2f3

Browse files
committed
remove gapi.auth fall back option for getAuthToken()
1 parent e0b677e commit 3dab2f3

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

packages/firestore/src/api/credentials.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -407,22 +407,15 @@ export class FirstPartyToken implements Token {
407407
private readonly authTokenFactory: AuthTokenFactory | null
408408
) {}
409409

410-
/** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */
410+
/**
411+
* Gets an authorization token, using a provided factory function, or return
412+
* null.
413+
*/
411414
private getAuthToken(): string | null {
412415
if (this.authTokenFactory) {
413416
return this.authTokenFactory();
414417
} else {
415-
// Make sure this really is a Gapi client.
416-
hardAssert(
417-
!!(
418-
typeof this.gapi === 'object' &&
419-
this.gapi !== null &&
420-
this.gapi['auth'] &&
421-
this.gapi['auth']['getAuthHeaderValueForFirstParty']
422-
),
423-
'unexpected gapi interface'
424-
);
425-
return this.gapi!['auth']['getAuthHeaderValueForFirstParty']([]);
418+
return null;
426419
}
427420
}
428421

0 commit comments

Comments
 (0)