Skip to content

Commit 56e0e67

Browse files
committed
Formatting
1 parent 34a2a39 commit 56e0e67

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages-exp/auth-exp/src/core/user/reload.ts

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ export async function _reloadWithoutSaving(user: User): Promise<void> {
4949

5050
const providerData = mergeProviderData(user.providerData, newProviderData);
5151

52+
// Preserves the non-nonymous status of the stored user, even if no more
53+
// credentials (federated or email/password) are linked to the user. If
54+
// the user was previously anonymous, then use provider data to update.
55+
// On the other hand, if it was not anonymous before, it should never be
56+
// considered anonymous now.
5257
const oldIsAnonymous = user.isAnonymous;
5358
const newIsAnonymous =
5459
!(user.email && coreAccount.passwordHash) && !providerData?.length;

0 commit comments

Comments
 (0)