@@ -161,6 +161,11 @@ var (
161
161
Value : "false" ,
162
162
Usage : "Use custom URLs for GitLab/GitHub OAuth endpoints" ,
163
163
},
164
+ cli.StringFlag {
165
+ Name : "custom-tenant-id" ,
166
+ Value : "" ,
167
+ Usage : "Use custom Tenant ID for OAuth endpoints" ,
168
+ },
164
169
cli.StringFlag {
165
170
Name : "custom-auth-url" ,
166
171
Value : "" ,
@@ -422,6 +427,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
422
427
AuthURL : c .String ("custom-auth-url" ),
423
428
ProfileURL : c .String ("custom-profile-url" ),
424
429
EmailURL : c .String ("custom-email-url" ),
430
+ Tenant : c .String ("custom-tenant-id" ),
425
431
}
426
432
} else {
427
433
customURLMapping = nil
@@ -531,6 +537,7 @@ func runUpdateOauth(c *cli.Context) error {
531
537
customURLMapping .AuthURL = oAuth2Config .CustomURLMapping .AuthURL
532
538
customURLMapping .ProfileURL = oAuth2Config .CustomURLMapping .ProfileURL
533
539
customURLMapping .EmailURL = oAuth2Config .CustomURLMapping .EmailURL
540
+ customURLMapping .Tenant = oAuth2Config .CustomURLMapping .Tenant
534
541
}
535
542
if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-token-url" ) {
536
543
customURLMapping .TokenURL = c .String ("custom-token-url" )
@@ -548,6 +555,10 @@ func runUpdateOauth(c *cli.Context) error {
548
555
customURLMapping .EmailURL = c .String ("custom-email-url" )
549
556
}
550
557
558
+ if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-tenant-id" ) {
559
+ customURLMapping .Tenant = c .String ("custom-tenant-id" )
560
+ }
561
+
551
562
oAuth2Config .CustomURLMapping = customURLMapping
552
563
source .Cfg = oAuth2Config
553
564
0 commit comments