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.

Amplify browser error - "Authentication Error"

See original GitHub issue

Note: If your question is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum

Which Category is your question related to? Authentication Error in the Browser signin / Sign up

Amplify CLI Version

You can use amplify -v to check the amplify cli version on your system 4.29.4

What AWS Services are you utilizing? AWS Cognito - User pool

Provide additional details e.g. code snippets I am using Amplify React libraries for integration with user pool sign in and sign up. My integration was working fine till yesterday and i was able to signin and signup new users. However, while enhancing my code base to add more details i ran into few issues and i need to reinstall aws-amplify. Now with the same code base, i keep on getting “Authentication error” in the browser while signing in or after clicking submit on sign up. My aws-exports for configuration looks like this -

  const awsconfig = {
    Auth: {
      // Amazon Cognito Region
      region: "us-east-1",
  
      // Amazon Cognito User Pool ID
      userPoolId: "us-east-1_XXXXX",
  
      // Amazon Cognito Web Client ID (26-char alphanumeric string)
      userPoolWebClientId: "YYYYYYYYYYYYYY"
      
    }
  };
  
  export default awsconfig;

Same configurations were working fine previously.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ryanhinojosacommented, Oct 14, 2020

@ashika01 @ericclemmons - Hi, we’ve been running into this issue for the last three upgrades.

aws-amplify: 3.3.3 3.3.2 3.3.1

@aws-amplify/ui-react 0.2.23 0.2.22 0.2.21

It’s always eventually solved for us by following these steps here which is convenient for me because I wrote those steps 😆 .

However if you’re using Netlify that adds another wrinkle in here since they typically cache dependencies, forcing us to then do a manual deploy without the cache after doing all of the above steps. I love Amplify, it saves us a ton of time, but every time there’s an update available it makes me nervous. And, it typically means I need to wait to update until after business hours to prevent breaking our logins. Which is why I’m now here 😄 .

Ideally these updates wouldn’t require these steps at all, and I’m sure your team is doing what they can. But the other part of this is the error message which makes it seem like the problem is with the config when (in my experience only) 90% of the time it’s with package-lock.json and node_modules.

Screen Shot 2020-10-13 at 8 32 45 PM

If this is your first time with this issue, it means that you’re going to spend a lot of time trying to figure out what could possibly be wrong with your config.

1reaction
vikasmca05commented, Oct 9, 2020

I did it multiple times the steps as mentioned but still i am getting the same error. Here are the debug logs. index.js:1 [ERROR] 04:49.341 AuthError - Error: Amplify has not been configured correctly. The configuration object is missing required auth properties. Did you run amplify push after adding auth via amplify add auth? See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more information

I dont remember my previous version of Amplify. But the current version is 3.3.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Amplify identity and access
If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to...
Read more >
Authentication - Advanced workflows - JavaScript - Amplify Docs
federatedSignIn() to get AWS credentials directly from Cognito Federated Identities and not use User Pool federation. If you have logged in with Auth.signIn() ......
Read more >
AWS Amplify Auth is not configured correctly - Stack Overflow
The top of the page shows: And in the browsers console log: [ERROR] 04:07.792 AuthError - Error: Amplify has not been configured correctly....
Read more >
AWS Amplify + React Native / Authentication FULL SETUP
AWS Amplify + React Native / Authentication FULL SETUP. One of the most requested topics ... Your browser can't play this video. ......
Read more >
A Complete Guide to the Amplify React Authentication ...
Run that command to sync your backend with your frontend. If you get a confirmation browser window, accept and then answer the questions...
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