Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make lint/fmt
  • Loading branch information
EdwardAngert committed Jan 3, 2025
commit 096326d019523dccf71b680d5540ce675014e0f8
7 changes: 4 additions & 3 deletions docs/admin/external-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ CODER_EXTERNAL_AUTH_0_CLIENT_SECRET=<OAuth app client secret>
CODER_EXTERNAL_AUTH_0_DISPLAY_NAME="Google Calendar"
CODER_EXTERNAL_AUTH_0_DISPLAY_ICON="https://mycustomicon.com/google.svg"
```

The `CODER_EXTERNAL_AUTH_0_ID` environment variable is used for internal
reference. Therefore, it can be set arbitrarily (e.g., `primary-github` for your
GitHub provider).
Expand All @@ -32,7 +33,7 @@ You can now add the following code to any template. This will add a button to th

```tf
data "coder_external_auth" "<github|gitlab|azure-devops|bitbucket-cloud|bitbucket-server|etc>" {
id = "<USER_DEFINED_ID>"
id = "<USER_DEFINED_ID>"
}

# Github Example (CODER_EXTERNAL_AUTH_0_ID="github-auth")
Expand All @@ -46,13 +47,13 @@ data "coder_external_auth" "github" {
Inside your terraform code, you now have access to authentication variables. Reference the documentation for your chosen provider for more information on how to supply it with a token.

### Workspace CLI

An access token can be accessed within the workspace by using

```
```shell
coder external-auth <USER_DEFINED_ID> access-token
```


## GitHub

> If you don't require fine-grained access control, it's easier to configure a
Expand Down
Loading