Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Linking anonymous account to phone number#809

Closed
creativecreatorormaybenot wants to merge 15 commits intoflutter:masterfrom
creativecreatorormaybenot:firebase-auth
Closed

Linking anonymous account to phone number#809
creativecreatorormaybenot wants to merge 15 commits intoflutter:masterfrom
creativecreatorormaybenot:firebase-auth

Conversation

@creativecreatorormaybenot
Copy link
Contributor

@creativecreatorormaybenot creativecreatorormaybenot commented Oct 2, 2018

This is lacking tests (although I do not know if they are required) and testing from my side. I am currently unable to test it because of this issue, but I figured that I might want to get some feedback already.

This pull request would resolve flutter/flutter#22491.

@kdy1
Copy link

kdy1 commented Oct 4, 2018

This also workarounds flutter/flutter#22304, as I can authenticate user with email first.

@creativecreatorormaybenot
Copy link
Contributor Author

I can confirm that this is now fully working as expected.
I am not sure what the point of the test functions is, but I added it anyway.

@kdy1
Copy link

kdy1 commented Oct 5, 2018

@creativecreatorormaybenot Does this pr add a feature to send a verification code (without signing in with the phone number flutter/flutter#22304)?

@creativecreatorormaybenot
Copy link
Contributor Author

@kdy1 This is what verifyPhoneNumber is doing already.

@kf6gpe
Copy link

kf6gpe commented Nov 7, 2018

This looks good, except for one teensy formatting nit, if you don't mind. Thanks for the contribution, and thanks especially for including a test with it! If you don't mind updating for the nit and resolving the branch conflict, we'll merge this after. Otherwise, we'll get it picked up eventually.

@collinjackson
Copy link
Contributor

I can take a look at this if conflicts are resolved

@creativecreatorormaybenot
Copy link
Contributor Author

This is now possible using linkWithCredential and PhoneAuthProvider.getCredential as described here.

@awazgyawali
Copy link
Contributor

awazgyawali commented May 5, 2019

Although this is possible using PhoneAuthProvider.getCredential, Android automatically detects SMS code and signs in the user with newer account instead of linking with the current one.

@collinjackson
Copy link
Contributor

collinjackson commented May 6, 2019

You're right @awazgyawali, see flutter/flutter#22304

@awazgyawali
Copy link
Contributor

Thus I have added a PR to fix this, can you look into it? Its a very simple one. #1568

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firebase Auth Convert anonymous acccount to Phone Number Account

6 participants