Skip to content

Create a token on behalf of another user in the CLI #13160

Closed
@bpmct

Description

@bpmct

An Owner account should be able to create a token on behalf of another user in the CLI. Right now, you can only do it in the API: https://coder.com/docs/v2/latest/api/users#create-token-api-key

Desired state (example, doesn't have to be this flag/wording):

➜  ~ coder tokens create --help
coder v2.10.0+a7234f6

USAGE:
  coder tokens create [flags]

  Create a token

OPTIONS:
      --lifetime duration, $CODER_TOKEN_LIFETIME (default: 720h0m0s)
          Specify a duration for the lifetime of the token.

  -n, --name string, $CODER_TOKEN_NAME
          Specify a human-readable name.

+  -u, --user string, $CODER_TOKEN_USER
+          Create the token on behalf of another user (Admin only)

———
Run `coder --help` for a list of global options.

Activity

added
good first issueEasily solved issues suitable for starters and community contributors
on May 7, 2024
Philip-21

Philip-21 commented on May 24, 2024

@Philip-21

Hello @bpmct i would like to take on this issue and get started with things.

matifali

matifali commented on Jul 8, 2024

@matifali
Member

related to #10246

self-assigned this
on Oct 14, 2024
SasSwart

SasSwart commented on Oct 14, 2024

@SasSwart
Contributor

Hey @joobisb! You seem to have merged a Pull request that addresses this issue. Is there still anything to do, or can it be closed?

matifali

matifali commented on Oct 14, 2024

@matifali
Member

@SasSwart we can close this as completed.
@joobisb for future references please use the words as described in: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

These words automatically link the issue and PR and close the issue when PR gets merged.

close
closes
closed
fix
fixes
fixed
resolve
resolves
resolved

1 remaining item

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliArea: CLIgood first issueEasily solved issues suitable for starters and community contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Create a token on behalf of another user in the CLI · Issue #13160 · coder/coder