Amplify browser error - "Authentication Error"
See original GitHub issueNote: 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:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
@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.
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.
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 viaamplify add auth
? See https://aws-amplify.github.io/docs/js/authentication#amplify-project-setup for more informationI dont remember my previous version of Amplify. But the current version is 3.3.3.