@@ -114,23 +114,28 @@ async def get_third_party_config(
114
114
115
115
# query param may be passed if we are creating a new third party config, check and update accordingly
116
116
117
- if third_party_id in ["okta" , "active-directory" , "boxy-saml" , "google-workspaces" ]:
118
- if third_party_id == "okta" :
117
+ if any (
118
+ [
119
+ third_party_id .startswith (tp_id )
120
+ for tp_id in ["okta" , "active-directory" , "boxy-saml" , "google-workspaces" ]
121
+ ]
122
+ ):
123
+ if third_party_id .startswith ("okta" ):
119
124
okta_domain = options .request .get_query_param ("oktaDomain" )
120
125
if okta_domain is not None :
121
126
additional_config = {"oktaDomain" : okta_domain }
122
- elif third_party_id == "active-directory" :
127
+ elif third_party_id . startswith ( "active-directory" ) :
123
128
directory_id = options .request .get_query_param ("directoryId" )
124
129
if directory_id is not None :
125
130
additional_config = {"directoryId" : directory_id }
126
- elif third_party_id == "boxy-saml" :
131
+ elif third_party_id . startswith ( "boxy-saml" ) :
127
132
boxy_url = options .request .get_query_param ("boxyUrl" )
128
133
boxy_api_key = options .request .get_query_param ("boxyAPIKey" )
129
134
if boxy_url is not None :
130
135
additional_config = {"boxyURL" : boxy_url }
131
136
if boxy_api_key is not None :
132
137
additional_config ["boxyAPIKey" ] = boxy_api_key
133
- elif third_party_id == "google-workspaces" :
138
+ elif third_party_id . startswith ( "google-workspaces" ) :
134
139
hd = options .request .get_query_param ("hd" )
135
140
if hd is not None :
136
141
additional_config = {"hd" : hd }
0 commit comments