8000 docs: add more specific steps and information about oidc refresh tokens by EdwardAngert · Pull Request #18336 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

docs: add more specific steps and information about oidc refresh tokens #18336

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
merged 20 commits into from
Jun 16, 2025
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
token config troubleshooting clarify
  • Loading branch information
EdwardAngert committed Jun 13, 2025
commit 0438aadaa3136ced7abb70312525291303832176
40 changes: 21 additions & 19 deletions docs/admin/users/oidc-auth/refresh-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ To verify refresh tokens are working correctly:

### Keycloak

Review Keycloak sessions for the presence of refresh tokens
Review Keycloak sessions for the presence of refresh tokens.

### Ping Federate

- Verify the client sent `offline_access` in the `grantedScopes` portion of the ID token
- Confirm `refresh_token` appears in the `grant_types` list returned by `/pf-admin-api/v1/oauth/clients/{id}`
- Verify the client sent `offline_access` in the `grantedScopes` portion of the ID token.
- Confirm `refresh_token` appears in the `grant_types` list returned by `/pf-admin-api/v1/oauth/clients/{id}`.

</div>

Expand All @@ -157,38 +157,40 @@ If all verification steps pass successfully, your refresh token configuration is

**Symptoms**:

- Users experience session timeouts and must re-authenticate
- Session timeouts typically occur after the access token expiration period (varies by provider, commonly 1 hour)
- Users experience session timeouts and must re-authenticate.
- Session timeouts typically occur after the access token expiration period (varies by provider, commonly 1 hour).

**Causes**:

- Missing `offline_access` scope in `CODER_OIDC_SCOPES`
- Provider not configured to issue refresh tokens
- User has not logged in since refresh token configuration was added
- Missing required refresh token configuration:
- `offline_access` scope for most providers
- `"access_type": "offline"` for Google
- Provider not correctly configured to issue refresh tokens.
- User has not logged in since refresh token configuration was added.

**Solution**:

- Add `offline_access` to your `CODER_OIDC_SCOPES` configuration
- Configure your identity provider according to the provider-specific instructions above
- Add `offline_access` to your `CODER_OIDC_SCOPES` configuration.
- Configure your identity provider according to the provider-specific instructions above.
- Have users log out and log in again to obtain refresh tokens.
Look for entries containing `failed to renew OIDC token` which might indicate specific provider issues.

Users might get logged out again before the new configuration takes effect completely.

### Refresh tokens don't work after configuration change

**Symptoms**:

- Session timeouts continue despite refresh token configuration and users re-authenticating
- Some users experience frequent logouts
- Session timeouts continue despite refresh token configuration and users re-authenticating.
- Some users experience frequent logouts.

**Cause**:

- Existing user sessions don't have refresh tokens stored
- Configuration may be incomplete
- Existing user sessions don't have refresh tokens stored.
- Configuration may be incomplete.

**Solution**:

- Users must log out and log in again to get refresh tokens stored in the database
- Verify you've correctly configured your provider as described in the configuration steps above
- Check Coder logs for specific error messages related to token refresh
- Users must log out and log in again to get refresh tokens stored in the database.
- Verify you've correctly configured your provider as described in the configuration steps above.
- Check Coder logs for specific error messages related to token refresh.

Users might get logged out again before the new configuration takes effect completely.
Loading
0