Skip to content

Commit

Permalink
again for LiteAppCheckTokenProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
DellaBitta committed Dec 16, 2024
1 parent de89ecd commit e632eeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/firestore/src/api/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@ export class EmptyAppCheckTokenProvider implements CredentialsProvider<string> {
/** AppCheck token provider for the Lite SDK. */
export class LiteAppCheckTokenProvider implements CredentialsProvider<string> {
private appCheck: FirebaseAppCheckInternal | null = null;
private serverAppAppCheckToken?: string;
private serverAppAppCheckToken: string | null = null;

constructor(
private app: FirebaseApp,
app: FirebaseApp,
private appCheckProvider: Provider<AppCheckInternalComponentName>
) {
if (_isFirebaseServerApp(app) && app.settings.appCheckToken) {
Expand All @@ -647,7 +647,7 @@ export class LiteAppCheckTokenProvider implements CredentialsProvider<string> {
}

getToken(): Promise<Token | null> {
if (this.serverAppAppCheckToken) {
if (this.serverAppAppCheckToken !== null) {
return Promise.resolve(new AppCheckToken(this.serverAppAppCheckToken));
}

Expand Down

0 comments on commit e632eeb

Please sign in to comment.