Anonymous user and account conversion to permanent account
See original GitHub issueHi there
Is there a way in which AuthUI supports the conversion of a anonymous account to a permanent one (one of the supplied auth providers)
As stated in the documentation and as I understand it, one must use the linkWithCredential
method instead of the “normal” signInWith
flow.
Can this be done with the current AuthUI version somehow?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:37
- Comments:100 (10 by maintainers)
Top Results From Across the Web
Firebase Convert Anonymous User Account to Permanent ...
Create the email and password credential, to upgrade the // anonymous user. var credential = firebase.auth.EmailAuthProvider.credential(email, password); // 2.
Read more >r/Firebase - Convert an anonymous account to a permanent ...
I created an anonymous user initially with signInAnonymously and then created email/password link using auth.EmailAuthProvider.credential and ...
Read more >Convert an anonymous account to a permanent account
When an unauthorized user signs up to my app, I want to allow them to continue their work with their new account —...
Read more >(Ep 22) Flutter: Anonymous Sign In & Conversion ... - YouTube
(Ep 22) Flutter: Anonymous Sign In & Conversion to Permanent User with ... anonymous account to a permanent account whenever they like.
Read more >Authenticate with Firebase Anonymously Using JavaScript
Convert an anonymous account to a permanent account · When the user signs up, complete the sign-in flow for the user's authentication provider...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Facing similar case. My app uses default anonymous login to provide a frictionless experience while being able to store user data. Log-in (non anonymously) is a secondary optional feature if the user wants to save his data between devices or access specific features. So my app doesn’t really have a true logout status and instead rely on anon/non-anon statuses.
1 - Simple scenario; An anonymous user with some local data decides to sign up with X provider (new account). In this case FirebaseUI creates a new user instead of linking the new credentials to the current anonymous user. Moreover the new user is loged in without a warning, so the anon user is lost for ever. ¿Wouldn’t be a good default behaviour to try to link the credentials first? In case an account for those credentials already exists
linkWithCredential
will return an exception which can be handled as follow (see scenario 2)2 - Complex scenario: An anonymous user tries to sign in (to an existing account). In this scenario we have 2 users and I guess it should be managed by the developer. So some sort of callback/result.
I see how this is problematic due to the potential complexity of second case, but at least the 1st case can be solved very easily by trying to link 1st new credentials when an anonymous user is in.
Ah, we have a slight problem here after discussing this with some colleagues. There is deliberately no way to get back an AuthCredential from an existing user, to avoid potentially leaking credentials. So, the linking of the authentication method to the anonymous account would have to occur within Firebase UI if you are using the library. I’ll take a look at this next week to get you unblocked ASAP.