We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34a2a39 commit 56e0e67Copy full SHA for 56e0e67
packages-exp/auth-exp/src/core/user/reload.ts
@@ -49,6 +49,11 @@ export async function _reloadWithoutSaving(user: User): Promise<void> {
49
50
const providerData = mergeProviderData(user.providerData, newProviderData);
51
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.
57
const oldIsAnonymous = user.isAnonymous;
58
const newIsAnonymous =
59
!(user.email && coreAccount.passwordHash) && !providerData?.length;
0 commit comments