@@ -308,6 +308,11 @@ var (
308308 Value : "false" ,
309309 Usage : "Use custom URLs for GitLab/GitHub OAuth endpoints" ,
310310 },
311+ cli.StringFlag {
312+ Name : "custom-tenant-id" ,
313+ Value : "" ,
314+ Usage : "Use custom Tenant ID for OAuth endpoints" ,
315+ },
311316 cli.StringFlag {
312317 Name : "custom-auth-url" ,
313318 Value : "" ,
@@ -829,6 +834,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
829834 AuthURL : c .String ("custom-auth-url" ),
830835 ProfileURL : c .String ("custom-profile-url" ),
831836 EmailURL : c .String ("custom-email-url" ),
837+ Tenant : c .String ("custom-tenant-id" ),
832838 }
833839 } else {
834840 customURLMapping = nil
@@ -938,6 +944,7 @@ func runUpdateOauth(c *cli.Context) error {
938944 customURLMapping .AuthURL = oAuth2Config .CustomURLMapping .AuthURL
939945 customURLMapping .ProfileURL = oAuth2Config .CustomURLMapping .ProfileURL
940946 customURLMapping .EmailURL = oAuth2Config .CustomURLMapping .EmailURL
947+ customURLMapping .Tenant = oAuth2Config .CustomURLMapping .Tenant
941948 }
942949 if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-token-url" ) {
943950 customURLMapping .TokenURL = c .String ("custom-token-url" )
@@ -955,6 +962,10 @@ func runUpdateOauth(c *cli.Context) error {
955962 customURLMapping .EmailURL = c .String ("custom-email-url" )
956963 }
957964
965+ if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-tenant-id" ) {
966+ customURLMapping .Tenant = c .String ("custom-tenant-id" )
967+ }
968+
958969 oAuth2Config .CustomURLMapping = customURLMapping
959970 source .Cfg = oAuth2Config
960971
0 commit comments