-
Notifications
You must be signed in to change notification settings - Fork 18
Prepare cli auth & access token retrieval for api key hashing #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare cli auth & access token retrieval for api key hashing #65
Conversation
…h route & remove api key generation there
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit
Also, did you test the new change with the current CLI?
|
||
if (!team || !selectedTeam) return | ||
|
||
await fetch('/api/team/state', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this fetch cause UI unresponsiveness (meaning delay after click)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but this only changes cookies which means no matter the outcome, latency will be ~20 ms. the cookies kind of have to be set before doing the push/refresh, which is why we await. the router.push already has some delay in this scenario, so we don't compromise on "non-instant" navigation here anyways at the moment.
In order to be prepared for our upcoming migration to hashed api keys, this pr introduces the following changes:
dashboard/account
/auth/cli
, since it is not required in the cliAdditionally but not entangled, it adds route for manual team selection cookie updates, to fix changing teams on a non team dependent route (e.g
/dashboard/account
)