-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[firebase_auth]: error.credential is null on credential-already-in-use exception during apple sign in in web #12771
Comments
Hello @BogsBalangat, thank you for reporting this issue. I've just tested the Apple login on the web, and it works without any issues. Could you please provide a minimal but complete example, or detail the steps that trigger this issue? Additionally, you might try integrating your Apple Sign-In and Firebase with the example app found here to test if the issue persists. |
Hi @TarekkMA, thank you for looking into this. I updated the repro steps and included code to run. The important condition here is that there should already be an existing firebase user linked to the apple account. That is why when the new anonymous user attempts to link the same apple account, firebase auth will throw an credential-already-in-use exception. In this case, the exception should have a non-null credential value which I can use to sign in instead.. |
Thank you, @BogsBalangat, for updating the steps required to reproduce the issue. I have been able to reproduce it and created a pure JS example where this issue does not occur. You can view it here: JS Example. We will look into fixing this issue. |
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Web
Description
Firebase auth in web returns a null credential value on a "credential-already-in-use" FirebaseAuthException during apple sign in.
This prevents the web app from being able to recover and continue with the sign in flow.
Notes:
This issue only happens on flutter web.
This does not happen during Google Sign in on flutter web.
It is working as expected (error.credential is not null) in flutter mobile (both android & ios)
Reproducing the issue
Make sure that you already have a firebase user linked to an apple account.
Then run the following code.
A new anonymous user will be created and make sure to sign in to the same apple account.
Here is a sample code:
Firebase Core version
2.30.1
Flutter Version
3.19.5
Relevant Log Output
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
Here is a screenshot showing actual values of the FirebaseAutghException.
*Shows that credential is null
The text was updated successfully, but these errors were encountered: