MythicLegendary / SP10_FALL_2022

2 stars 0 forks source link

Allow user to recover wallet from mnemonic, and set a new password; Reject new setup attempts if wallet exists. #60 #61

Closed wildwilliam2 closed 1 year ago

wildwilliam2 commented 1 year ago

I believe I have identified a bug: the uid of the user is time dependent. This is a majoissue.

wildwilliam2 commented 1 year ago

GPT seems to disagree: The uid (user identifier) generated by Firebase Authentication is not time-dependent. Firebase Authentication creates unique, random, and non-predictable user identifiers when a user signs up or logs in for the first time using any of the supported authentication providers (such as email/password, Google, Facebook, etc.). The uid is used to identify the user across all Firebase services, like Firestore and Realtime Database.

The generated uid remains constant for the lifetime of the user account, meaning it won't change over time or depend on the user's sign-in time. It is designed to be a stable identifier for a user, allowing you to associate user-specific data with the account, even as the user's profile information (such as email, name, or profile picture) may change.

In summary, the uid generated by Firebase Authentication is not time-dependent and remains consistent throughout the user's account lifecycle.

wildwilliam2 commented 1 year ago

2ee59d8ae04cdb4cfc5002e71a3b26ff73cd2d40

wildwilliam2 commented 1 year ago

The previous errors were generated because we were deleting the firebasuser without if the setup failed during setup wallet- this would make the user a new uid with the same email, thus incorrectly turning them away.