Amplify-js: Authentication problem: error=redirect_mismatch

Created on 31 Oct 2019  路  10Comments  路  Source: aws-amplify/amplify-js

Describe the bug
I have a federated authentication with google. When the redirect urls are localhost there's no problem, even when I publish the project to cloudfront, but when I change the redirect urls to the one provided by cloudfront, everytime I try to login it keeps me sending to the same error page.

image. I tryed redirecting to the google search page (https://www.google.com) and it's the same: On localhost it works, but after I publish to cloudfront, it simply fails.

I really hope you can help me.

Auth pending-close-response-required to-be-reproduced

Most helpful comment

I'm having the exact same issue where it was working on my local host and when I stoop up my cloudfront/s3 https site and added that as redirects along with my localhost.
Has anyone gotten to a solution?

All 10 comments

@tobon96 When you say you've changed the redirect URL, you mean that you've changed the 'Callback URL' in Cognito?

Yes, I changed the 'Callback URL' through the Amplify console. It just works in localhost.

@tobon96, Amplify Console or Cognito Console?

Maybe I wasn't specific enough. Through the CLI, with amplify update auth, add/edit redirect urls.

I'm still having the issue after updating de CLI. Any update over this matter?

having the same issue here with Facebook login. Redirecting back to localhost ionic always gives this error

@tobon96 Can you post the redirect uris exactly as they appear under the oauth key in your aws-exports?

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

I'm having the exact same issue where it was working on my local host and when I stoop up my cloudfront/s3 https site and added that as redirects along with my localhost.
Has anyone gotten to a solution?

This is because of the mismatched url for either redirectSignIn or redirectSignOut. Please check both setup in aws console and code aws_config, and make them consistent.

image

image

image
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

callmekatootie picture callmekatootie  路  3Comments

guanzo picture guanzo  路  3Comments

lucasmike picture lucasmike  路  3Comments

karlmosenbacher picture karlmosenbacher  路  3Comments

josoroma picture josoroma  路  3Comments