Skip to content

Conversation

@slhr
Copy link
Collaborator

@slhr slhr commented Nov 6, 2025

The api has been changed to work with a pair of tokens.

Before:
getToken: () => Promise<string>
saveToken: (token: string) => Promise<void>
refreshToken: () => Promise<string>

After:
getAccessToken: () => Promise<string>
saveTokens: (tokens: { accessToken: string, refreshToken: string }) => Promise<void>
refreshTokens: () => Promise<{ accessToken: string, refreshToken: string }>

Problem with the old approach:
When a 401 error occurred, the HTTP wrapper saved only one of the tokens, which caused issues when working with a pair.

@elenik72 elenik72 merged commit d3b82fa into Cado-Labs:master Nov 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants