amplify-js: Apple Signing Token is not from a supported provider of this identity pool.
Describe the bug I can’t signing with federated using https://github.com/invertase/react-native-apple-authentication In the provider I tested with SignInWithApple or appleid.apple.com
Code Snippet await Auth.federatedSignIn(‘appleid.apple.com’, {token: data.identityToken, expires_at: null})
Screenshots If applicable, add screenshots to help explain your problem.
What is Configured? If applicable, please provide what is configured for Amplify CLI:
Auth: {
identityPoolId: 'us-east-1:59cf7619-1bf8-4dc0-xxxx-xxx',
region: 'us-east-1',
storage: MemoryStorageNew,
userPoolId: 'us-east-1_xxxx,
userPoolWebClientId: ''
}
Smartphone (please complete the following information):
- Device: iPhone11
- OS: 13.4
Additional context Add any other context about the problem here.
You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = ‘DEBUG’; in your app.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 47 (19 by maintainers)
@mezalejandro After looking a bit further, there seem to be 2 options for you to integrate “Sign In With Apple” in your app.
The first is using the OAuth Hosted UI, where the user will be taken to a browser to authenticate. In this case, you don’t need to use that 3rd party library to get the Apple token, as Cognito will handle that behind the scenes. In this case, you can just use
Auth.federatedSignIn({provider: 'SignInWithApple'}).The other option is using Identity Pool Federation, where you will have to manage all of the tokens via the client & the 3rd party library you’re currently using.
There are some intricacies with this approach, however. Here’s how I got a working example:
@TanviVartak Ah ok! I’ll look into it and respond in that other issue, as the original issue here is a slightly different use-case.
Hello @amhinson I followed all the steps https://aws.amazon.com/blogs/security/how-to-set-up-sign-in-with-apple-for-amazon-cognito/
Then using https://github.com/invertase/react-native-apple-authentication
In Auth of was-amplify I see the options: export declare enum CognitoHostedUIIdentityProvider { Cognito = “COGNITO”, Google = “Google”, Facebook = “Facebook”, Amazon = “LoginWithAmazon” }
There is no SignInWithApple option