Skip to content

Commit

Permalink
Rename to initializeCurrentUserFromIdToken
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed Mar 20, 2024
1 parent 8ea8934 commit 5090091
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/auth/src/core/auth/auth_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
await this._updateCurrentUser(user, /* skipBeforeStateCallbacks */ true);
}

private async loadUserFromIdToken(idToken: string): Promise<void> {
private async initializeCurrentUserFromIdToken(
idToken: string
): Promise<void> {
try {
const response = await getAccountInfo(this, { idToken });
const user = await UserImpl._fromGetAccountInfoResponse(
Expand Down Expand Up @@ -248,7 +250,10 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
// attach an emulator, if desired.
return new Promise<void>(resolve => {
setTimeout(() =>
this.loadUserFromIdToken(idToken).then(resolve, resolve)
this.initializeCurrentUserFromIdToken(idToken).then(
resolve,
resolve
)
);
});
} else {
Expand Down

0 comments on commit 5090091

Please sign in to comment.