I encountered a strange situation. My project uses an HTTP-only refresh token. After the user successfully completes the login verification, the backend sends an HTTP-only refresh token to the frontend.
When I use my home computer and enter the website using the Chrome browser, I can see the HTTP-only cookie returned in the response headers in the browser’s developer tools.
enter image description here
However, I can’t see this cookie in the application’s cookies, which results in the user having to log in again to get the refresh token every time they visit the website.
enter image description here
However, when I perform the same operation on my company’s computer, I can see the HTTP-only cookie returned in the response headers in the browser’s developer tools, and I can also see this cookie in the application’s cookies.
enter image description here
enter image description here
Why is this happening?
I have tried using the Edge browser and encountered the same issue. However, when I perform the same operation on my Xiaomi tablet, the problem does not occur.
許漢昇 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.