DEV Community

Duc Nguyen
Duc Nguyen

Posted on

Next Auth Cognito Authentication Errors

Took me an hour to figure out.
Given you have this ARN of a User Pool:
arn:aws:cognito-idp:ap-southeast-1:74051077XX03:userpool/ap-southeast-1_XXnxUPYvFj4

The issuer should be https://cognito-idp.ap-southeast.amazonaws.com/ap-southeast-1_XXnxUPYvFj4

Notice the different of cognito-idp vs amazonaws.com

I was so into the Cognito Domain https://2-xxxxxxxxxxxxxxxx.auth.ap-southeast-1.amazoncognito.com

References:

https://next-auth.js.org/providers/cognito

Top comments (0)