@@ -161,6 +161,11 @@ var (
161161 Value : "false" ,
162162 Usage : "Use custom URLs for GitLab/GitHub OAuth endpoints" ,
163163 },
164+ cli.StringFlag {
165+ Name : "custom-tenant-id" ,
166+ Value : "" ,
167+ Usage : "Use custom Tenant ID for OAuth endpoints" ,
168+ },
164169 cli.StringFlag {
165170 Name : "custom-auth-url" ,
166171 Value : "" ,
@@ -422,6 +427,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
422427 AuthURL : c .String ("custom-auth-url" ),
423428 ProfileURL : c .String ("custom-profile-url" ),
424429 EmailURL : c .String ("custom-email-url" ),
430+ Tenant : c .String ("custom-tenant-id" ),
425431 }
426432 } else {
427433 customURLMapping = nil
@@ -531,6 +537,7 @@ func runUpdateOauth(c *cli.Context) error {
531537 customURLMapping .AuthURL = oAuth2Config .CustomURLMapping .AuthURL
532538 customURLMapping .ProfileURL = oAuth2Config .CustomURLMapping .ProfileURL
533539 customURLMapping .EmailURL = oAuth2Config .CustomURLMapping .EmailURL
540+ customURLMapping .Tenant = oAuth2Config .CustomURLMapping .Tenant
534541 }
535542 if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-token-url" ) {
536543 customURLMapping .TokenURL = c .String ("custom-token-url" )
@@ -548,6 +555,10 @@ func runUpdateOauth(c *cli.Context) error {
548555 customURLMapping .EmailURL = c .String ("custom-email-url" )
549556 }
550557
558+ if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-tenant-id" ) {
559+ customURLMapping .Tenant = c .String ("custom-tenant-id" )
560+ }
561+
551562 oAuth2Config .CustomURLMapping = customURLMapping
552563 source .Cfg = oAuth2Config
553564
0 commit comments