Auth Using withAuthenticator HOC
See original GitHub issue** Which Category is your question related to? ** Auth Using withAuthenticator HOC ** What AWS Services are you utilizing? ** Cognito ** Provide additional details e.g. code snippets **
I have followed the basic setup with Google Sign Up following the Amplify documentation.
Adding amplify add auth
everything seems correct and works when using the url provided at the end of the auth set up. It will take me through auth flow and redirects to my app correctly and also adds a new user into my user pool.
https://<domain>.us-east-1.amazoncognito.com/login?response_type=code&client_id=<client id>&redirect_uri=http://localhost:3000/auth/signin/
When I attempt to run locally by wrapping my app withAuthenticator
ReactDOM.render(<AppWithAuth includeGreetings={true} federated={myFederatedConfig}/> , document.getElementById('root'));
I get the Amplify sign in screen as expected and can see the google login option. Upon correct login with google, I get errors in the flow and get stuck on the amplify login screen.
POST https://cognito-identity.us-east-1.amazonaws.com/ 400
json.js:54 Uncaught (in promise) NotAuthorizedException: Token is not from a supported provider of this identity pool.
I am assuming I am doing something wrong here or am unsure of how this is meant to work. From reading the documentation, I would expect after approving through Google, I would have a user created in my identity pool, my application would display and the user would be available to my application.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top GitHub Comments
It seems that your code is using the identity pool and not UserPool which is a different thing If you want to use identity pool take a look at this link . be careful! For using UserPool with Google signin the only way around is hosted ui.
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.