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): linkWithCredential will not attempt to upgrade from anon user (matches iOS) #5694

Merged
merged 1 commit into from
Sep 4, 2021

Conversation

Albocal
Copy link
Contributor

@Albocal Albocal commented Sep 4, 2021

Description

When doing "linkWithCredential" in Android and the users exists, it makes relogin with this new user instead of launch exception:
Error: [auth/credential-already-in-use] This credential is already associated with a different user account.

Related issues

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes --> Only for Android
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Description
When doing "linkWithCredential" in Android and the users exists relogin with this new user instead of launch exception 
Error: [auth/credential-already-in-use] This credential is already associated with a different user account.

Related issues
@vercel
Copy link

vercel bot commented Sep 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

react-native-firebase – ./

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/DpJztSP8sKvUAkEqMnE9EeKADFag
✅ Preview: https://react-native-firebase-git-fork-albocal-patch-1-invertase.vercel.app

react-native-firebase-next – ./website_modular

🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/587vAasLKcwRcNzZZH6uj5ezJUwV
✅ Preview: Canceled

@CLAassistant
Copy link

CLAassistant commented Sep 4, 2021

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 4, 2021

Codecov Report

Merging #5694 (d045936) into master (5dde564) will increase coverage by 0.11%.
The diff coverage is 0.00%.

❗ Current head d045936 differs from pull request most recent head 56a9c41. Consider uploading reports for the commit 56a9c41 to get more accurate results

@@             Coverage Diff              @@
##             master    #5694      +/-   ##
============================================
+ Coverage     53.63%   53.73%   +0.11%     
  Complexity      632      632              
============================================
  Files           208      208              
  Lines         10085    10069      -16     
  Branches       1543     1542       -1     
============================================
+ Hits           5408     5410       +2     
+ Misses         4393     4375      -18     
  Partials        284      284              

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! I went to the relevant PR #4487 and PR #4552 and per a comment there:

#4487 (comment)

the original author has actually disavowed this style as well, with an indication it was no longer working anyway, so this looks like a good PR. Shame the style doesn't work - it would be a nicer DX if it did work and we could do the same thing in iOS but it is best if the platforms are consistent, and if this isn't working it should be removed

Thanks for the PR!

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Sep 4, 2021
@mikehardy mikehardy changed the title fix: linkWithCredential different behavior between Android and IOS fix(auth, android): linkWithCredential will not attempt to upgrade from anon user (matches iOS) Sep 4, 2021
@mikehardy mikehardy merged commit 7cd1716 into invertase:master Sep 4, 2021
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Sep 4, 2021
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.

3 participants