@@ -308,6 +308,11 @@ var (
308
308
Value : "false" ,
309
309
Usage : "Use custom URLs for GitLab/GitHub OAuth endpoints" ,
310
310
},
311
+ cli.StringFlag {
312
+ Name : "custom-tenant-id" ,
313
+ Value : "" ,
314
+ Usage : "Use custom Tenant ID for OAuth endpoints" ,
315
+ },
311
316
cli.StringFlag {
312
317
Name : "custom-auth-url" ,
313
318
Value : "" ,
@@ -829,6 +834,7 @@ func parseOAuth2Config(c *cli.Context) *oauth2.Source {
829
834
AuthURL : c .String ("custom-auth-url" ),
830
835
ProfileURL : c .String ("custom-profile-url" ),
831
836
EmailURL : c .String ("custom-email-url" ),
837
+ Tenant : c .String ("custom-tenant-id" ),
832
838
}
833
839
} else {
834
840
customURLMapping = nil
@@ -938,6 +944,7 @@ func runUpdateOauth(c *cli.Context) error {
938
944
customURLMapping .AuthURL = oAuth2Config .CustomURLMapping .AuthURL
939
945
customURLMapping .ProfileURL = oAuth2Config .CustomURLMapping .ProfileURL
940
946
customURLMapping .EmailURL = oAuth2Config .CustomURLMapping .EmailURL
947
+ customURLMapping .Tenant = oAuth2Config .CustomURLMapping .Tenant
941
948
}
942
949
if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-token-url" ) {
943
950
customURLMapping .TokenURL = c .String ("custom-token-url" )
@@ -955,6 +962,10 @@ func runUpdateOauth(c *cli.Context) error {
955
962
customURLMapping .EmailURL = c .String ("custom-email-url" )
956
963
}
957
964
965
+ if c .IsSet ("use-custom-urls" ) && c .IsSet ("custom-tenant-id" ) {
966
+ customURLMapping .Tenant = c .String ("custom-tenant-id" )
967
+ }
968
+
958
969
oAuth2Config .CustomURLMapping = customURLMapping
959
970
source .Cfg = oAuth2Config
960
971
0 commit comments