File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
248
248
249
249
// Has it's own auth
250
250
"GET:/api/v2/users/oauth2/github/callback" : {NoAuthorize : true },
251
+ "GET:/api/v2/users/oidc/callback" : {NoAuthorize : true },
251
252
252
253
// All workspaceagents endpoints do not use rbac
253
254
"POST:/api/v2/workspaceagents/aws-instance-identity" : {NoAuthorize : true },
Original file line number Diff line number Diff line change @@ -319,6 +319,18 @@ func TestUserOIDC(t *testing.T) {
319
319
Username : "hotdog" ,
320
320
AllowSignups : true ,
321
321
StatusCode : http .StatusTemporaryRedirect ,
322
+ }, {
323
+ // Services like Okta return the email as the username:
324
+ // https://developer.okta.com/docs/reference/api/oidc/#base-claims-always-present
325
+ Name : "UsernameAsEmail" ,
326
+ Claims : jwt.MapClaims {
327
+ "email" : "kyle@kwc.io" ,
328
+ "email_verified" : true ,
329
+ "preferred_username" : "kyle@kwc.io" ,
330
+ },
331
+ Username : "kyle" ,
332
+ AllowSignups : true ,
333
+ StatusCode : http .StatusTemporaryRedirect ,
322
334
}} {
323
335
tc := tc
324
336
t .Run (tc .Name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments