question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ucharcommented, Jun 24, 2019

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.

0reactions
github-actions[bot]commented, Jun 12, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use the AWS Amplify withAuthenticator HOC to Implement a ...
In this lesson we'll enable user authentication (Amazon Cognito) in the existing AWS Amplify project, then use the withAuthenticator higher ...
Read more >
How do I pass signUpConfig to Amplify's withAuthenticator ...
I am trying to create a react app using Typescript and AWS Amplify for user authentication. I want to limit the sign up...
Read more >
Customizing the authentication experience of Amplify's ...
When we left off, we implemented authentication into our app using aws-amplify-react's withAuthenticator component. The result of this is ...
Read more >
Amplify UI's new Authenticator component makes it easy to ...
Create an app backend with authentication ... Update your App.js to use the withAuthenticator Higher-order component (HOC).
Read more >
How to Set Up Authentication With AWS Amplify in Next
object; Finally, to get the app working with authentication, wrap the app with the higher-order component (HOC), withAuthenticator().
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found