Yaak Logo
Yaak
Feedback/token not refreshing when switching environments

token not refreshing when switching environments

Jack McQuinn·10 months ago
ReleasedBug

This bug has been introduced by upgrading to 2025.5.0, this was all working as expected yesterday on 2025.5.0.

  • Using authentication in folder settings > OAuth 2 > Client Credentials.

  • If I make a request in Env1 the token is correctly fetched and applied to my requests.

  • When I change to Env2, all my requests now fail with 401 Unauthorized

  • If I delete the token from folder settings > OAuth 2, then a new token is generated and my requests work.

Decoding the token, I can see that the token available after in Env2 immediately after switching from Env1 and making a new request is still using the clientId from Env1.

Linux2025.5.0

Comments (11)

Sign in to leave a comment.

Jack McQuinnOP

*working on 2025.4.0

Gregory Schier

Oops, commented on the wrong feedback. I’ll be fixing this as well though

Gregory Schier

Ah, I think I see the problem. There was a bug in the last version that caused the token always be refetched on every new request.

I’m fixing it now so that tokens are keyed by clientId/authUrl/tokenUrl

Gregory Schier

Alright, in 2025.5.2 the stored tokens are now stored as a combined key of clientId/tokenUrl/authorizationUrl so I think this should work for you.

Jack McQuinnOP

Amazing, can confirm this is fixed in 2025.5.2.

Thanks for the quick turn around!

Gregory Schier

Awesome, thanks for the quick reply! Now I can go to bed in peace :)

Oliver Streißelberger

@Greg Schier I’ve a similar issue, but not when switching workspaces, when the token expires, it’s not auto-refreshing. I’m using the workspace settings for it and I have to delete the token and then it’s working again.

I’m on 2025.5.6

Gregory Schier

Oh interesting. Which grant type are you using? Also, do you see the expires_in field within the Access Token Response?

Oliver Streißelberger

I’m using Client Credentials grant type and can’t see the expires_in field in the response.
I only see the following fields:

  • access_token

  • signature

  • instance_url

  • id

  • token_type

  • issued_at

Oliver Streißelberger

@Greg Schier this is still an issue, can you maybe have a look at it? Or should I create a new Bug ticket?

Gregory Schier

Can you create a new one with as much detail as possible?

Type to search feedback...