Closed AmitaiMazliah closed 4 years ago
Implementing Apple sign in today for the first time and I am experiencing this issue too.
Hi @AmitaiMazliah given the official firebase docs about signing in with apple I'm not aware if the 3rd party plugin apple_sign_in [github] provides what is required, although, without this being any type of endorsement, it seems to be possible in this article. Without hijacking the issue, this would be an opportunity to provide documentation about achieving this without relying on 3rd party plugins.
https://github.com/FirebaseExtended/flutterfire/pull/1549 https://github.com/FirebaseExtended/flutterfire/issues/1434
Hi @AmitaiMazliah,
I have a same issue and I debugged with XCode, I detected condition for customAuthCredential
([provider length] != 0 && data[@"idToken"] != (id)[NSNull null] && (data[@"accessToken"] != (id)[NSNull null] | data[@"rawNonce"] != (id)[NSNull null]))
It means that you need to send argument accessToken or rawNonce to FirebaseAuth can create AuthCredential.
About rawNonce, you need sha256 random string, Firebase had topic about that https://firebase.google.com/docs/auth/ios/apple
It's worked with me
now it is works following https://medium.com/@kevinlivin/it-seems-you-are-using-oauthprovider-from-5462fd0e2a5e
Hey 👋
Our rework of the Auth, Core & Firestore plugins as part of the FlutterFire roadmap was published over a week ago with a ton of fixes and new features.
As part of this we introduced a new documentation site which should has a lot of new documentation that should cover this issue (there's a new social auth section on the docs) & others in general. If you spot any issues on the documentation or anything missing then please raise a new GitHub issue, or better yet suggest a change via a Pull Request (there's a 'Edit this page' button at the bottom of every page on the docs).
Additionally, for help migrating to these new plugins I'd recommend checking out the migration guide: https://firebase.flutter.dev/docs/migration
Describe the bug I'm trying to implement login with apple with firebase I'm using https://pub.dev/packages/apple_sign_in To get the apple cred, than I'm passing the creds to firebase but I'm getting an error
I have enabled apple login in the firebase console
To Reproduce Steps to reproduce the behavior: this is my code
I'm getting the cred back from apple, than I'm creating firebase AuthCredential successfully. I'm getting an exception on this line _firebaseAuth.signInWithCredential(credential);
This is the exception log: