Skip to content

feat: generate a new session with coder login --token #8275

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

Merged
merged 6 commits into from
Jul 5, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 30, 2023

Makes sure /logout does not delete the inputted token
Fixes #8169

I added a flag use-token-as-session to do the previous behavior of using the token as the session, rather than making a new key. Figured it might be helpful in some cases, and should be possible. The workaround would be to make the auth file manually and write to it, which sounds prone to error.

Notes

I removed the deprecated from CreateAPIKey because we use it in the FE and now here. This api endpoint serves a unique purpose to create "session tokens" for cli/browser auth. Until we expand the /tokens endpoint or make a new one for this case, I don't think we should deprecate it.

Makes sure /logout does not delete the inputted token
@Emyrk Emyrk changed the title feat: coder login --token generates a new session generate a new session with coder login --token Jun 30, 2023
@Emyrk Emyrk changed the title generate a new session with coder login --token feat: generate a new session with coder login --token Jun 30, 2023
@Emyrk Emyrk requested a review from deansheather June 30, 2023 14:44
@Emyrk Emyrk merged commit 9a7705c into main Jul 5, 2023
@Emyrk Emyrk deleted the stevenmasley/login_new_token branch July 5, 2023 12:59
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coder tokens erase when session expired, token don't persist with lifetime flag
2 participants