mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: Optionally consume email_verified
if it's provided (#3957)
This reduces our OIDC requirement claims to only `email`. If `email_verified` is provided and is `false`, we will block authentication. Fixes #3954.
This commit is contained in:
@ -302,11 +302,20 @@ func TestUserOIDC(t *testing.T) {
|
||||
AvatarURL string
|
||||
StatusCode int
|
||||
}{{
|
||||
Name: "EmailNotVerified",
|
||||
Name: "EmailOnly",
|
||||
Claims: jwt.MapClaims{
|
||||
"email": "kyle@kwc.io",
|
||||
},
|
||||
AllowSignups: true,
|
||||
StatusCode: http.StatusTemporaryRedirect,
|
||||
Username: "kyle",
|
||||
}, {
|
||||
Name: "EmailNotVerified",
|
||||
Claims: jwt.MapClaims{
|
||||
"email": "kyle@kwc.io",
|
||||
"email_verified": false,
|
||||
},
|
||||
AllowSignups: true,
|
||||
StatusCode: http.StatusForbidden,
|
||||
}, {
|
||||
Name: "NotInRequiredEmailDomain",
|
||||
|
Reference in New Issue
Block a user