Skip to content

[QUO-1390] allow for multiple api_keys#92

Merged
waldnzwrld merged 2 commits intomainfrom
verify-that-token-exists-for-multiple-keys
Apr 29, 2025
Merged

[QUO-1390] allow for multiple api_keys#92
waldnzwrld merged 2 commits intomainfrom
verify-that-token-exists-for-multiple-keys

Conversation

@waldnzwrld
Copy link

We ran into a situation where a user is hot swapping accounts.

Should we even allow this? How do we manage billing and limits if we allow user hotswapping from a single IP?

Ignoring the question above for now, This Pull request allows for multiple API_KEYs to be used from a single machine, by naming jwt's with the last 6 of the key and bolstering the validity checks to determine if the jwt in question is the same as the one in use.

We need to know if the user is then hotswapping the keys programmatically or if they are pausing and reloading the agent etc.

If they are programmatically hotswapping, then we will also need to modify the behaviour to re-authenticate instead of just reaching out to modal since the authetication only occurs at initialisation.

There is actually a lot to take in here regarding the user experience we want to provide, the ways in which we enforce billing, and the behaviour needed to fully tackle the jwt state management of the localised agent

@linear
Copy link

linear bot commented Apr 29, 2025

QUO-1390 Client uses old JWT if users switch API keys across accounts

We came across an issue #ext-hark-quotient where a user (drexmcarthur) used an API key to send logs, and then switched to a different account (devsendhark) and set a new API key.

Then they sent logs and they would not show up in the new account.

This is likely due to the fact we write a JWT the first time, and so we were likely using the first JWT for the second user

freddiev4
freddiev4 previously approved these changes Apr 29, 2025
@waldnzwrld waldnzwrld merged commit 4423f65 into main Apr 29, 2025
2 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