Skip to content

Commit

Permalink
Skip loading users from persistence with FirebaseServerApps.
Browse files Browse the repository at this point in the history
  • Loading branch information
DellaBitta committed Jan 26, 2024
1 parent 020687b commit 63cf1fb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/auth/src/core/auth/auth_impl.ts
Expand Up @@ -15,7 +15,11 @@
* limitations under the License.
*/

import { _FirebaseService, FirebaseApp } from '@firebase/app';
import {
_isFirebaseServerApp,
_FirebaseService,
FirebaseApp
} from '@firebase/app';
import { Provider } from '@firebase/component';
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types';
import {
Expand Down Expand Up @@ -167,7 +171,11 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
}
}

await this.initializeCurrentUser(popupRedirectResolver);
// Skip loading users from persistence in FirebaseServerApp Auth instances.
if (!_isFirebaseServerApp(this.app)) {
await this.initializeCurrentUser(popupRedirectResolver);
}

this.lastNotifiedUid = this.currentUser?.uid || null;

if (this._deleted) {
Expand Down

0 comments on commit 63cf1fb

Please sign in to comment.