Browser Deleting Cookies on Refresh. #3669
Unanswered
SayedTahsin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue Summary
I’m using Hono.js for the backend of my project and have implemented a login function to set a cookie with JWT for authentication. However, I'm encountering issues with the cookie being removed on reload when accessed from my frontend deployed on a different domain.
Note: This issue only occures on production. (Everything is fine in dev mode)
Backend-repo: Routine-Hono
Frontend-repo: Routine-Vue
Environment
sameSite: "None"
secure: true
httpOnly: false
path: "/"
maxAge: 60 * 60 * 24 * 30
(30 days)Problem Details
Code Example
Here’s my login function with the cookie setup:
Troubleshooting Steps
I’ve checked several common cross-origin and SameSite-related issues, including:
Providing index.ts file as it maybe caused due to my project setup.
Beta Was this translation helpful? Give feedback.
All reactions