Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth, android): return credential for signin if phone auth has link collision #7793

Merged
merged 4 commits into from
May 15, 2024

Conversation

joaqo
Copy link
Contributor

@joaqo joaqo commented May 14, 2024

Description

You can now upgrade anonymous users using phone auth on Android. Credit to @Shaninnik.

Fixes:

You can now upgrade anonymous users using phone auth on Android. Credit to @Shaninnik.
Copy link

vercel bot commented May 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2024 2:35am

@CLAassistant
Copy link

CLAassistant commented May 14, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for posting this - looks promising with some comments as indicated
I made them all in the form of suggestions, I'll apply them + reformat + push to the branch then do final review

I think this can go in though

@mikehardy mikehardy changed the title Fix Android phone sign in not returning authCredential fix(auth, android): return credential if phone auth has collision May 14, 2024
cleaning things up after merging in suggestions
mikehardy
mikehardy previously approved these changes May 14, 2024
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable, if it passes CI I can merge this in

@mikehardy mikehardy changed the title fix(auth, android): return credential if phone auth has collision fix(auth, android): return credential for signin if phone auth has link collision May 14, 2024
@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label May 14, 2024
@mikehardy
Copy link
Collaborator

Ah, I do love a thorough test suite - it picked something up on this one so it will need some further examination before merge:

      linkWithCredential()
        ✔ should link anonymous account <-> email account
23:32:06.039 detox[5958] ERROR: [WS_ERROR] The app has crashed, see the details below:

@Thread pool-106-thread-1(633):
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
	at io.invertase.firebase.auth.ReactNativeFirebaseAuthModule.promiseRejectLinkAuthException(ReactNativeFirebaseAuthModule.java:2244)
	at io.invertase.firebase.auth.ReactNativeFirebaseAuthModule.lambda$linkWithCredential$34(ReactNativeFirebaseAuthModule.java:1626)
	at io.invertase.firebase.auth.ReactNativeFirebaseAuthModule.$r8$lambda$Lodml2tmhgEN3Twg2KfjZTSQTN4(Unknown Source:0)
	at io.invertase.firebase.auth.ReactNativeFirebaseAuthModule$$ExternalSyntheticLambda1.onComplete(Unknown Source:4)
	at com.google.android.gms.tasks.zzi.run(com.google.android.gms:play-services-tasks@@18.1.0:1)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)

@mikehardy mikehardy added Workflow: Needs Review Pending feedback or review from a maintainer. and removed Workflow: Pending Merge Waiting on CI or similar labels May 15, 2024
@mikehardy mikehardy self-requested a review May 15, 2024 01:59
@mikehardy mikehardy merged commit f8916e2 into invertase:main May 15, 2024
15 of 17 checks passed
@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label May 15, 2024
@joaqo
Copy link
Contributor Author

joaqo commented May 16, 2024

This is fantastic, thank you so much @mikehardy for the fixes and the merge!

@joaqo
Copy link
Contributor Author

joaqo commented May 16, 2024

Is there anywhere I can look to keep track for your release schedule so I know when to upgrade my dependencies? Thanks!

@mikehardy
Copy link
Collaborator

Unfortunately our release process doesn't formally make releases in GitHub so you can't really subscribe there, apologies. I usually release things about as soon as I merge them, this one just was held up a few days on CI issues, it's out now though

@joaqo
Copy link
Contributor Author

joaqo commented May 22, 2024

No problem, yesterday I found you had a CHANGELOG file and noticed the new releases, so I upgraded our dependencies. Everythings working smoothly ✌️, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] "auth"/linkWithCredential, does not return credential-already-in-use
3 participants