2023-10-09 18:04:35 -05:00
|
|
|
coder v0.0.0-devel
|
|
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
|
coder external-auth access-token [flags] <provider>
|
|
|
|
|
|
|
|
|
|
Print auth for an external provider
|
|
|
|
|
|
|
|
|
|
Print an access-token for an external auth provider. The access-token will be
|
|
|
|
|
validated and sent to stdout with exit code 0. If a valid access-token cannot
|
|
|
|
|
be obtained, the URL to authenticate will be sent to stdout with exit code 1
|
|
|
|
|
- Ensure that the user is authenticated with GitHub before cloning.:
|
|
|
|
|
|
|
|
|
|
$ #!/usr/bin/env sh
|
|
|
|
|
|
|
|
|
|
OUTPUT=$(coder external-auth access-token github)
|
|
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
|
echo "Authenticated with GitHub"
|
|
|
|
|
else
|
|
|
|
|
echo "Please authenticate with GitHub:"
|
|
|
|
|
echo $OUTPUT
|
|
|
|
|
fi
|
2023-10-09 23:02:16 -05:00
|
|
|
|
|
|
|
|
- Obtain an extra property of an access token for additional metadata.:
|
|
|
|
|
|
|
|
|
|
$ coder external-auth access-token slack --extra "authed_user.id"
|
2026-07-07 12:38:37 -07:00
|
|
|
|
|
|
|
|
- Print the full token response as JSON.:
|
|
|
|
|
|
|
|
|
|
$ coder external-auth access-token github --output json
|
2023-10-09 18:04:35 -05:00
|
|
|
|
|
|
|
|
OPTIONS:
|
2025-09-03 10:38:42 +04:00
|
|
|
--auth string, $CODER_AGENT_AUTH (default: token)
|
|
|
|
|
Specify the authentication type to use for the agent.
|
|
|
|
|
|
2026-04-16 13:59:09 +02:00
|
|
|
--agent-name string, $CODER_AGENT_NAME
|
|
|
|
|
The name of the agent to authenticate as (only applicable for instance
|
|
|
|
|
identity).
|
|
|
|
|
|
2025-09-03 10:38:42 +04:00
|
|
|
--agent-token string, $CODER_AGENT_TOKEN
|
|
|
|
|
An agent authentication token.
|
|
|
|
|
|
|
|
|
|
--agent-token-file string, $CODER_AGENT_TOKEN_FILE
|
|
|
|
|
A file containing an agent authentication token.
|
|
|
|
|
|
|
|
|
|
--agent-url url, $CODER_AGENT_URL
|
|
|
|
|
URL for an agent to access your deployment.
|
|
|
|
|
|
2023-10-09 23:02:16 -05:00
|
|
|
--extra string
|
|
|
|
|
Extract a field from the "extra" properties of the OAuth token.
|
2023-10-09 18:04:35 -05:00
|
|
|
|
2026-07-07 12:38:37 -07:00
|
|
|
--output text|json (default: text)
|
|
|
|
|
Output format. Available formats: text, json.
|
|
|
|
|
|
2023-10-09 18:04:35 -05:00
|
|
|
———
|
|
|
|
|
Run `coder --help` for a list of global options.
|