Skip to content

Commit a61f8ee

Browse files
authored
fix: apply default ExtraTokenKeys to oauth (#10155)
1 parent 863c2e7 commit a61f8ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

coderd/externalauth/externalauth.go

+4
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ func ConvertConfig(entries []codersdk.ExternalAuthConfig, accessURL *url.URL) ([
469469
AppInstallURL: entry.AppInstallURL,
470470
DisplayName: entry.DisplayName,
471471
DisplayIcon: entry.DisplayIcon,
472+
ExtraTokenKeys: entry.ExtraTokenKeys,
472473
}
473474

474475
if entry.DeviceFlow {
@@ -521,6 +522,9 @@ func applyDefaultsToConfig(config *codersdk.ExternalAuthConfig) {
521522
if config.DisplayIcon == "" {
522523
config.DisplayIcon = defaults.DisplayIcon
523524
}
525+
if config.ExtraTokenKeys == nil || len(config.ExtraTokenKeys) == 0 {
526+
config.ExtraTokenKeys = defaults.ExtraTokenKeys
527+
}
524528

525529
// Apply defaults if it's still empty...
526530
if config.ID == "" {

0 commit comments

Comments
 (0)