fix: Allow OIDC with the username as email (#4594)

Fixes #4472.
This commit is contained in:
Kyle Carberry
2022-10-17 14:14:49 -05:00
committed by GitHub
parent ae9d7f6b4c
commit 618c6dcaa4
2 changed files with 27 additions and 9 deletions
+9
View File
@@ -425,6 +425,15 @@ func TestUserOIDC(t *testing.T) {
Username: "kyle",
AllowSignups: true,
StatusCode: http.StatusTemporaryRedirect,
}, {
// See: https://github.com/coder/coder/issues/4472
Name: "UsernameIsEmail",
Claims: jwt.MapClaims{
"preferred_username": "kyle@kwc.io",
},
Username: "kyle",
AllowSignups: true,
StatusCode: http.StatusTemporaryRedirect,
}, {
Name: "WithPicture",
Claims: jwt.MapClaims{