-
Notifications
You must be signed in to change notification settings - Fork 4k
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 invalid_credential on iOS when attempting to call revokeTokenWithAuthorizationCode #16744
Comments
Hi @zakton5, thanks for the report. I tested with your sample code and everything seems to work fine on my end. Could you provide a complete minimal code reproducing this issue? |
@SelaseKay Wouldn't that involve setting up a new flutter project, firebase project, apple app identifier, service id, etc. Is there an example repository somewhere that I can cross reference to see if I did things right? |
Hi @zakton5, you can take a look at this: https://github.com/firebase/flutterfire/tree/main/packages/firebase_auth/firebase_auth/example. |
@SelaseKay That example project was very helpful. Without changing anything, it works well and I can revoke a token. But the moment I point it to my own firebase project I get this error: [firebase_auth/internal-error] An internal error has occurred, print and inspect the error details for more information. There are no additional details in the error to print for more information though. I have absolutely no idea where to go where from here. |
@zakton5 According to the docs, your code should work but I'm facing the same problem. However, I decided to use the more complex Sign In with Apple method, with a nonce to get apple credentials. Following that I can get the auth code from the Apple Auth credentials.
|
@apetroaeiandrei Using this method lets you successfully revoke the user's token? I guess I'll have to give that a shot and see if it works. |
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
iOS
Description
I have set up Sign In with Apple according to the docs and have followed multiple tutorials to make sure I did everything right in my Apple Developer account and Firebase Settings. Pretty sure I'm good to go.
My app sign in with apple does work. The user gets signed up and can use my app normally. The problem is when allowing a user to delete their account. This is the error I get:
[firebase_auth/invalid-credential] Error getting access token from Apple. OAuth2 redirect uri is
The message leads me to think I didn't set something up right, but I have no idea where I would set an "OAuth2 redirect uri"
Expected result: Apple sign in is revoked and disappears from the Apps using Apple Sign In section in apple account settings.
Actual result: Above error message.
Reproducing the issue
Here is my code for both sign up and account deletion. According to the docs here, this is all I need: https://firebase.google.com/docs/auth/flutter/federated-auth#revoke-apple
Firebase Core version
3.8.0
Flutter Version
3.24.3
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: