-
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
Token Cookies duplicated after upgrading to 6.5.1 from 5.3.17 #13781
Comments
Hello @AboulEinein. Sorry for any inconvenience using the library. Can you configure the cookies as follows?
|
@israx I can do that, but it will cause the same issue to new users that logged in after the upgrade to v6 |
Hi @AboulEinein what @israx suggested is correct. You need to create an instance for overriding the cookie storage. There is another limitation however, since you are using Next.js and if you are using the prebuilt |
@AboulEinein, just wanted to follow up on this and see if there are any further questions on this issue that we can help address. Let us know! |
Closing this issue as we have not heard back from you. Please review this comment above and let us know if there is any further feedback or questions. We'd be happy to reopen this issue if needed. Thank you! |
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
Other
Environment information
Describe the bug
After upgrading to version 6.5.1, we encountered 403 errors related to our token management system, which relies on cookies. Upon investigation, we discovered that prior to the upgrade, the cookies' domain was set with a leading dot (e.g., .example.com). However, post-upgrade, the domain is now set without the leading dot (e.g., example.com). This change has caused duplicate cookies for users who were already logged in, resulting in the cookie size exceeding the limit permitted by CloudFront, ultimately leading to the 403 errors.
Expected behavior
Cookies to be handled correctly without any duplications.
Reproduction steps
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
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: