-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication Redirect Loop with Amplify Cognito in Next.js (Next 15.4.1, Amplify 5.3.26) #14203
Comments
Hi @rushicruk, |
Hi @rushicruk, Additionally, could you also double check |
Hello,
|
Hello,
|
Hi @rushicruk a side note, since your working with Next.js 15+, we recommend you to use Amplify JS v6 along with the |
Regarding the error
It's thrown from the underlying dependency /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ The workaround you pasted simply replaces the usage of
so inspect the passed in cookie name? |
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
GraphQL API
Amplify Version
v5
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
I'm using SSO signin for our admin console authentication. After successful authentication via Cognito, the user is unexpectedly redirected back to the sign-in page. This occurs despite receiving a valid authorisation code and no explicit errors in the console. I'm currently migrating CRA to Nextjs. Same code works in React.
Additional Context:
Troubleshooting Attempted:
Expected behavior
After successful authentication, the user should remain authenticated and not be redirected to the sign-in page and navigate me to respective page.
Reproduction steps
nA
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: