Skip to content
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

feat(cli): prompt user for authentication on subsequent logins (#11004, #9329) #12883

Closed
wants to merge 3 commits into from

Commits on Apr 7, 2024

  1. feat(cli): prompt when relogging as authed user (coder#11004, coder#9329

    )
    
    Prompt the user if they want to re-authenticate if they run
    `coder login` when already authenticated.
    
    Does not apply if they provided a token via flag or ENV
    variable. A new token should be generated an stored in that situation
    unless the `--use-token-as-session` flag was also used.
    
    fix(cli): prompt user on login attempt with invalid ENV token
    
    Fixes issue where if invalid token was set as ENV
    variable a user would be unable to login until the ENV
    variable was cleared.
    
    User will now be informed that the token is invalid and
    prompted to login normally.
    elasticspoon committed Apr 7, 2024
    Configuration menu
    Copy the full SHA
    f45143b View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. fixup!: handle cliui.Canceled error

    cliui should return nil when returning cliui.Canceled (CTRL-C) and
    return error others
    
    fix nits
    elasticspoon committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    f0616ea View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2024

  1. fixup!: remove check for ENV token validity in login

    I made an incorrect assumption, we can check if
    a flag/env token is valid on login and create a new
    token if the provided one is invalid.
    
    However, on subsequent requests the invalid ENV token
    will still take priority over the valid token stored
    on disk. Therefore, this behavior does not work.
    elasticspoon committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    341fedd View commit details
    Browse the repository at this point in the history