-
Notifications
You must be signed in to change notification settings - Fork 961
docs(admin/users): add google provider-specific guide #19309
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
+67
−0
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
796d5d4
docs(oidc): add Google provider-specific guide and nav entry
DevelopmentCats 1065dda
Merge branch 'main' into docs/google-oidc
DevelopmentCats 488cffd
chore: update coder example url
DevelopmentCats fcf07b1
fix(docs): correct indentation in manifest
DevelopmentCats f0c7f94
chore: make gen
DevelopmentCats File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
docs(oidc): add Google provider-specific guide and nav entry
Adds a concise guide for configuring Google as an OIDC provider, including refresh token params and icon/text hints. Updates docs nav to surface the page under OIDC Authentication. Refs #13508.
- Loading branch information
commit 796d5d4b7ad1bd41c8a8c8cdd266debe1d6db856
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Google authentication (OIDC) | ||
|
||
This guide shows how to configure Coder to authenticate users with Google using OpenID Connect (OIDC). | ||
|
||
## Prerequisites | ||
|
||
- A Google Cloud project with the OAuth consent screen configured | ||
- Permission to create OAuth 2.0 Client IDs in Google Cloud | ||
|
||
## Step 1: Create an OAuth client in Google Cloud | ||
|
||
1. Open Google Cloud Console → APIs & Services → Credentials → Create Credentials → OAuth client ID. | ||
2. Application type: Web application. | ||
3. Authorized redirect URIs: add your Coder callback URL: | ||
- `https://coder.domain.com/api/v2/users/oidc/callback` | ||
4. Save and note the Client ID and Client secret. | ||
|
||
## Step 2: Configure Coder OIDC for Google | ||
|
||
Set the following environment variables on your Coder deployment and restart Coder: | ||
|
||
```env | ||
CODER_OIDC_ISSUER_URL=https://accounts.google.com | ||
CODER_OIDC_CLIENT_ID=<client id> | ||
CODER_OIDC_CLIENT_SECRET=<client secret> | ||
# Restrict to one or more email domains (comma-separated) | ||
CODER_OIDC_EMAIL_DOMAIN="example.com" | ||
# Standard OIDC scopes for Google | ||
CODER_OIDC_SCOPES=openid,profile,email | ||
# Optional: customize the login button | ||
CODER_OIDC_SIGN_IN_TEXT="Sign in with Google" | ||
CODER_OIDC_ICON_URL=/icon/google.svg | ||
``` | ||
|
||
> [!NOTE] | ||
> The redirect URI must exactly match what you configured in Google Cloud. | ||
|
||
## Enable refresh tokens (recommended) | ||
|
||
Google uses auth URL parameters to issue refresh tokens. Configure: | ||
|
||
```env | ||
# Keep standard scopes | ||
CODER_OIDC_SCOPES=openid,profile,email | ||
# Add Google-specific auth URL params | ||
CODER_OIDC_AUTH_URL_PARAMS='{"access_type": "offline", "prompt": "consent"}' | ||
``` | ||
|
||
After changing settings, users must log out and back in once to obtain refresh tokens. | ||
|
||
Learn more in [Configure OIDC refresh tokens](./refresh-tokens.md). | ||
|
||
## Troubleshooting | ||
|
||
- "invalid redirect_uri": ensure the redirect URI in Google Cloud matches `https://<your-coder-host>/api/v2/users/oidc/callback`. | ||
- Domain restriction: if users from unexpected domains can log in, verify `CODER_OIDC_EMAIL_DOMAIN`. | ||
- Claims: to inspect claims returned by Google, see guidance in the [OIDC overview](./index.md#oidc-claims). | ||
|
||
## See also | ||
|
||
- [OIDC overview](./index.md) | ||
- [Configure OIDC refresh tokens](./refresh-tokens.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.