I have implemented apple login to my Ionic project, and followed the guides on setting up on Apple's side and in the cognito condole.
I call the login:
public async loginWithApple(): Promise<any> {
this.amplify.auth().federatedSignIn({ provider: 'SignInWithApple' });
}
However once i get through apples OAuth process and just before redirection I get the cognito error page saying:
An error was encountered with the requested page.
followed by:
Invalid State/RelayState provided.
Any ideas on why this is happening?
@oliverandersencox I wonder if this is the same issue here? https://github.com/aws-amplify/amplify-js/issues/4580
Could you try the steps I outlined on the other ticket (deleting your sign in with apple permission and trying from a simulator)?
@oliverandersencox just want to make sure, have you enabled "Sign in with Apple" in the Enabled Identity Providers section for the client(s) you're using in your Amplify app? (in the AWS Console: Cognito -> User Pool -> App Integration -> App client settings -> Enabled Identity Providers).
Also, have you configured Attribute mapping for the Apple IDP?
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.
Same issue here (on Android device)
--edit--
My problem was that in the Cognito console > App Integration > App Client Settings, I forgot to check off "Sign in with Apple" under "app client web" (mind that the topmost option is "app client")
Most helpful comment
Same issue here (on Android device)
--edit--
My problem was that in the Cognito console > App Integration > App Client Settings, I forgot to check off "Sign in with Apple" under "app client web" (mind that the topmost option is "app client")