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

[SIGN_IN_WITH_APPLE]"Cannot Complete Request" Error after Clicking "Continue", Flutter Web #395

Open
1ns4n33 opened this issue Feb 8, 2024 · 4 comments

Comments

@1ns4n33
Copy link

1ns4n33 commented Feb 8, 2024

Hello,

I'm encountering an issue with implementing Apple Sign-In in my Flutter application using Firebase. I've followed all the required steps for setting up Apple Sign-In, including configuring the key and certificates through the Apple Developer account and setting up the OAuth code flow in Firebase.

Everything works up to the point where the Apple Sign-In popup asks the user if they want to continue using the app with their Apple ID. After clicking "Continue", instead of completing the sign-in process, I receive an error message stating, "Cannot complete the request due to an error. Please try again later."

Here are the steps I've taken:

  • Configured the Apple Sign-In method in Firebase Authentication.
  • Set up the necessary key and certificates in the Apple Developer console.
  • Verified the Service ID and redirect URIs are correctly configured.
  • Implemented the sign-in code in my Flutter app as per the Firebase documentation.

Despite these configurations, I'm stuck at the error mentioned above. It's important to note that I'm not using a custom backend; I'm relying entirely on Firebase and Flutter for the authentication process.

I suspect this might be related to some configuration issue or a specific behavior in how Firebase or the browser handles the OAuth flow, but I'm unsure how to proceed in debugging this problem.

Could anyone provide insights or suggestions on how to resolve this issue? Any help would be greatly appreciated.

Additionally, if you wish to experience the issue firsthand, you can attempt the Apple Sign-In process on our application's website (With Google) at app.jimtime.it. This might provide a clearer understanding of the problem's nature and the point at which the error occurs.

Thank you

@1ns4n33 1ns4n33 changed the title "Cannot Complete Request" Error after Clicking "Continue", Flutter Web [SIGN_IN_WITH_APPLE]"Cannot Complete Request" Error after Clicking "Continue", Flutter Web Feb 8, 2024
@HenriBeck
Copy link
Member

Hey,

Could you please share some code on how you use our sign_in_with_apple package??

Cannot complete the request due to an error. Please try again later.

Is this error still on the Apple website or is that on your own webpage?

@dleurs
Copy link

dleurs commented Aug 21, 2024

Same issue here

Apple sign in working on Android and iOS, but not on web :

`

if (kIsWeb) {
  final rawNonce = generateNonce();
  final nonce = sha256ofString(rawNonce);

  final appleCredential = await SignInWithApple.getAppleIDCredential(
    scopes: [
      AppleIDAuthorizationScopes.email,
    ],
    webAuthenticationOptions: WebAuthenticationOptions(
            clientId: "fr.trompe.appli.login",
            redirectUri: Uri.parse("https://loftXXXrtle.glitch.me/callbacks/sign_in_with_apple"),
          ),
    nonce: nonce,
  );

  final oauthCredential = OAuthProvider("apple.com").credential(
    idToken: appleCredential.identityToken,
    rawNonce: rawNonce,
  );

  return await FirebaseAuth.instance.signInWithCredential(oauthCredential);
}

`

360063393-417dd4ad-090f-4602-9a28-42d4c40ca09c

@AlmutawakelSukaina
Copy link

AlmutawakelSukaina commented Sep 9, 2024

I’m experiencing the same problem and would appreciate any updates or potential workarounds. @1ns4n33

@ERICKGALVAN
Copy link

could someone resolve this issue?

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

No branches or pull requests

5 participants