thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.64k stars 130 forks source link

2 cookies with same name shown in the Cookie Manager #1427

Closed r9d7 closed 11 months ago

r9d7 commented 11 months ago

Describe the bug

After setting an initial refresh_token cookie, when rotating the token & setting the new cookie value 2 cookies with the same name are shown in the Cookie Manager.

To Reproduce

  1. /auth/login -> return a Set-Cookie with an initial refresh_token
  2. /auth/refresh-tone -> return a Set-Cookie with new value for refresh_token
  3. Open the Cookie Manager

image

Expected behavior

I assume the expected behaviour is that there's only one refresh_token with the latest value shown, unless I missed something or I need extra config but I couldn't find any info regarding this on the internet.

Platform:

Are you using the free version/paid version/trial:

The free version

Update:

rangav commented 11 months ago

Hi @duckradu

Thanks for reporting the bug, Will look into it.

r9d7 commented 11 months ago

@rangav I have figured out my issue:

It's a bit embarrassing to admit but I forgot to set the cookie path property and relied on @fastify/cookie. While setting the cookie, there was no default path in my config, but when clearing it the library would automatically add path: '/' :facepalm:

I'll close this issue since it's not related to ThunderClient, sorry for wasting your time.