Replies: 1 comment 3 replies
-
The error logging was incorrect. The issue was coming incorrect attribute mapping of email. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environment
System:
OS: macOS 13.5
CPU: (10) arm64 Apple M1 Pro
Memory: 730.44 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.5.0 - ~/.asdf/installs/nodejs/18.5.0/bin/node
npm: 9.8.1 - ~/.asdf/plugins/nodejs/shims/npm
Browsers:
Safari: 16.6
Reproduction URL
google.com
Describe the issue
I am using the Next-Auth AWS Cognito Federated Provider. I am successfully redirected to federate and able to login, but the redirect to the callback URL fails with the following error on the server console. how can i resolve this ?
Also, I tracked network calls and i think something is wrong when next-auth gets the callback request with code and status as below:
I don't understand why the console error says invalid client when federate goes through successfully and return code and state back to callbackurl.
How to reproduce
Cognito web client is using below settings
Authentication flows
ALLOW_REFRESH_TOKEN_AUTH
ALLOW_CUSTOM_AUTH
ALLOW_USER_SRP_AUTH
Allowed callback URLs
http://localhost:3000
http://localhost:3000/api/auth/callback/cognito
OAuth grant types
Authorization code grant
OpenID Connect scopes
email
openid
phone
profile
I am using nextjs13 app directory with middleware.
middleware.ts
Api/[...nextauth].route.ts
../../../../lib/auth
Expected behavior
next-auth redirects to localhost:3000 with code and state
Beta Was this translation helpful? Give feedback.
All reactions