Skip to content

fix: apply default ExtraTokenKeys to oauth #10155

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 2 commits into from
Oct 10, 2023
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
Next Next commit
fix: apply default ExtraTokenKeys to oauth
  • Loading branch information
kylecarbs committed Oct 10, 2023
commit 8b7d792fdb0daf958b4638553fe35993f663edda
3 changes: 3 additions & 0 deletions coderd/externalauth/externalauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ func applyDefaultsToConfig(config *codersdk.ExternalAuthConfig) {
if config.DisplayIcon == "" {
config.DisplayIcon = defaults.DisplayIcon
}
if config.ExtraTokenKeys == nil || len(config.ExtraTokenKeys) == 0 {
config.ExtraTokenKeys = defaults.ExtraTokenKeys
}

// Apply defaults if it's still empty...
if config.ID == "" {
Expand Down