|
48 | 48 | from workos.types.user_management.user_management_provider_type import ( |
49 | 49 | UserManagementProviderType, |
50 | 50 | ) |
| 51 | +from workos.types.user_management.screen_hint import ( |
| 52 | + ScreenHintType |
| 53 | +) |
51 | 54 | from workos.typing.sync_or_async import SyncOrAsync |
52 | 55 | from workos.utils.http_client import AsyncHTTPClient, SyncHTTPClient |
53 | 56 | from workos.utils.pagination_order import PaginationOrder |
@@ -342,6 +345,7 @@ def get_authorization_url( |
342 | 345 | organization_id: Optional[str] = None, |
343 | 346 | code_challenge: Optional[str] = None, |
344 | 347 | prompt: Optional[str] = None, |
| 348 | + screen_hint: Optional[ScreenHintType] = None, |
345 | 349 | ) -> str: |
346 | 350 | """Generate an OAuth 2.0 authorization URL. |
347 | 351 |
|
@@ -369,6 +373,7 @@ def get_authorization_url( |
369 | 373 | prompt (str): Used to specify whether the upstream provider should prompt the user for credentials or other |
370 | 374 | consent. Valid values depend on the provider. Currently only applies to provider values of 'GoogleOAuth', |
371 | 375 | 'MicrosoftOAuth', or 'GitHubOAuth'. (Optional) |
| 376 | + screen_hint (ScreenHintType): Specify which AuthKit screen users should land on upon redirection (Only applicable when provider is 'authkit'). |
372 | 377 |
|
373 | 378 | Returns: |
374 | 379 | str: URL to redirect a User to to begin the OAuth workflow with WorkOS |
@@ -401,6 +406,8 @@ def get_authorization_url( |
401 | 406 | params["code_challenge_method"] = "S256" |
402 | 407 | if prompt is not None: |
403 | 408 | params["prompt"] = prompt |
| 409 | + if screen_hint is not None: |
| 410 | + params["screen_hint"] = screen_hint |
404 | 411 |
|
405 | 412 | return RequestHelper.build_url_with_query_params( |
406 | 413 | base_url=self._client_configuration.base_url, |
|
0 commit comments