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

Access to FIRAuthErrorUserInfoUpdatedCredentialKey on linkUserWithCredential auth/credential-already-in-use error #916

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

nivlempert1
Copy link

PR Type

What kind of change does this PR introduce?

Anonymous account linking operation can fail if the credential is already associated with another account. A common case is, that you want to either link or sign in to an account. For most auth providers the first credential can be reused for the sign in operation. In case of Apple Auth, we receive an updated credential in the error.
The plugin would not handle that error correctly, so the user would have to go through double sign in popups in order to make that flow work

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Documentation changes
  • Other... Please describe:

What is the purpose of this PR?

createAuthErrorResult would not handle the case of FIRAuthErrorCodeCredentialAlreadyInUse as it should- it would not save the updatedCredentials that are returned in the error and it did not pass them forward.
Saved the updatedCredentials and sent it forward.

Does this PR introduce a breaking change?

  • Yes
  • No

What testing has been done on the changes in the PR?

Tested on my own private project

…dential auth/credential-already-in-use error
@dpa99c dpa99c merged commit 96f12d7 into dpa99c:master Dec 3, 2024
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.

2 participants