mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli/server.go): allow the use of public OIDC clients (#16489)
Support public OIDC clients - Enables support for public OIDC clients by only checking for a client ID being set. This allows for confidential and public clients to be used with Coder's OIDC authentication. - Also adds a public client configuration to the development OIDC setup script. Fixes #16135 Change-Id: Iadd85d40c2faa595a0498e25d3407a1f94b5c8a8 Signed-off-by: Thomas Kosiewski <tk@coder.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
+6
-1
@@ -694,7 +694,12 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
|
||||
}
|
||||
}
|
||||
|
||||
if vals.OIDC.ClientKeyFile != "" || vals.OIDC.ClientSecret != "" {
|
||||
// As OIDC clients can be confidential or public,
|
||||
// we should only check for a client id being set.
|
||||
// The underlying library handles the case of no
|
||||
// client secrets correctly. For more details on
|
||||
// client types: https://oauth.net/2/client-types/
|
||||
if vals.OIDC.ClientID != "" {
|
||||
if vals.OIDC.IgnoreEmailVerified {
|
||||
logger.Warn(ctx, "coder will not check email_verified for OIDC logins")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user