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] iOS crashes when signing in with Apple #9638
Comments
👍 - Also seeing the same issue and the same error. One other test note: After app restart the auth object is valid and available. ie the auth user then exists in our app state on next restart. So crash occurs after successful login. Crash is critical closes app completely, doesn't just hang. Closing the dialog and not attempting to login does not crash. |
Thanks for the report @felixgabler
Also verified using previous plugin version (3.10.0) and replicates. |
/cc @Lyokone |
if you need a solution right now and it's urgent to work with apple sign in you can use firebase_auth: 3.9.0 it works perfectly |
Thanks for the report, I'm looking into this |
Does it also correctly return name and email according to the scopes? That's also a major blocker for us |
@felixgabler If I'm not mistaken, for security reasons, Apple returns the Name and the Email only on the first sign-in, if you don't catch them at this time, you cannot retrieve them again. Might need to double-check that, but please open another PR concerning this issue. |
yes it returns only for first sign-in |
yes it does, but to mention for apple it returns email and fullname only in first sign in after that it returns null, so you should store them in secure storage if you want to reuse them |
Thanks for looking into it again! I know that it doesn't work on subsequent logins but normally it works when I disconnect my apple ID in the apple ID settings (https://appleid.apple.com/account/manage). For example, it does work with sign in with apple on Android. I was just curious whether you know if it broke somewhere between these versions. Will open another issue later. |
I've opened #9644 that fixes the issue, will probably be merged and released early next week |
This need to be fixed as soon as possible! It's very urgent. |
Does not work, unfortunately. Still crashes! |
The fix was released in v3.11.1 thanks for your patience. |
Bug report
Describe the bug
When I try to sign in with my Apple ID using
await _auth.signInWithProvider(appleProvider)
the app crashes on iOS. On Android it works fine.The console output:
Device logs of the crash:
Steps to reproduce
Steps to reproduce the behavior:
FirebaseAuth.instance.signInWithProvider(appleProvider)
Expected behavior
The app should sign me in with my Apple ID and return
name
andemail
in theuserCredential.user.providerData
.Sample project
If required, I can take the time to set something up but for iOS I feel like it is super complicated with new App ID, Team ID etc. Or am I missing a simple way to share it?
Here is the relevant code I use (copied from my app).
Additional context
Tested both on a simulator and a real device. I always removed the Apple ID from the app between tests using the Apple ID settings. Also tried
flutter clean
and removing the scopesname
andemail
.The scopes actually also do not seem to work correctly with the new
signInWithProvider
(also not withlinkWithProvider
) in my testing with the previous version of this package. They do not return a name and email. Should I create another issue about this?I previously used
sign_in_with_apple
but replaced it and set everything up according to https://firebase.google.com/docs/auth/flutter/federated-auth#ios. It works well for Android for both sign in and linking. It also returns the name and email correctly.Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: