@@ -150,9 +150,10 @@ def mock_invitations_multiple_pages(self):
150150class TestUserManagementBase (UserManagementFixtures ):
151151 @pytest .fixture (autouse = True )
152152 def setup (self , sync_client_configuration_and_http_client_for_test ):
153- client_configuration , http_client = (
154- sync_client_configuration_and_http_client_for_test
155- )
153+ (
154+ client_configuration ,
155+ http_client ,
156+ ) = sync_client_configuration_and_http_client_for_test
156157 self .http_client = http_client
157158 self .user_management = UserManagement (
158159 http_client = self .http_client , client_configuration = client_configuration
@@ -320,6 +321,29 @@ def test_authorization_url_has_expected_query_params_with_code_challenge(self):
320321 "response_type" : RESPONSE_TYPE_CODE ,
321322 }
322323
324+ def test_authorization_url_has_expected_query_params_with_screen_hint (self ):
325+ connection_id = "connection_123"
326+ redirect_uri = "https://localhost/auth/callback"
327+ screen_hint = "sign-up"
328+
329+ authorization_url = self .user_management .get_authorization_url (
330+ connection_id = connection_id ,
331+ screen_hint = screen_hint ,
332+ redirect_uri = redirect_uri ,
333+ provider = "authkit" ,
334+ )
335+
336+ parsed_url = urlparse (authorization_url )
337+ assert parsed_url .path == "/user_management/authorize"
338+ assert dict (parse_qsl (str (parsed_url .query ))) == {
339+ "screen_hint" : screen_hint ,
340+ "client_id" : self .http_client .client_id ,
341+ "redirect_uri" : redirect_uri ,
342+ "connection_id" : connection_id ,
343+ "response_type" : RESPONSE_TYPE_CODE ,
344+ "provider" : "authkit" ,
345+ }
346+
323347 def test_get_jwks_url (self ):
324348 expected = "%ssso/jwks/%s" % (
325349 self .http_client .base_url ,
0 commit comments