diff --git a/stytch/b2b/api/discovery_intermediate_sessions.py b/stytch/b2b/api/discovery_intermediate_sessions.py index e1a98fa..35b0f41 100644 --- a/stytch/b2b/api/discovery_intermediate_sessions.py +++ b/stytch/b2b/api/discovery_intermediate_sessions.py @@ -68,7 +68,7 @@ def exchange( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -140,7 +140,7 @@ async def exchange_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/magic_links.py b/stytch/b2b/api/magic_links.py index 94efe7a..afc7a6b 100644 --- a/stytch/b2b/api/magic_links.py +++ b/stytch/b2b/api/magic_links.py @@ -84,7 +84,7 @@ def authenticate( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -166,7 +166,7 @@ async def authenticate_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/magic_links_email.py b/stytch/b2b/api/magic_links_email.py index 567b952..e1983ae 100644 --- a/stytch/b2b/api/magic_links_email.py +++ b/stytch/b2b/api/magic_links_email.py @@ -60,11 +60,10 @@ def login_or_signup( the request by querying Stytch's authenticate endpoint and finishes the login. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - pkce_code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Signup. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + built-in customizations or a custom HTML email for “Magic Links - Signup”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -126,11 +125,10 @@ async def login_or_signup_async( the request by querying Stytch's authenticate endpoint and finishes the login. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - pkce_code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Signup. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + built-in customizations or a custom HTML email for “Magic Links - Signup”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -200,9 +198,8 @@ def invite( - untrusted_metadata: An arbitrary JSON object of application-specific data. These fields can be edited directly by the frontend SDK, and should not be used to store critical information. See the [Metadata resource](https://stytch.com/docs/b2b/api/metadata) for complete field behavior details. - - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. The template must be a template - using our built-in customizations or a custom HTML email for Magic Links - Invite. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Invite”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -277,9 +274,8 @@ async def invite_async( - untrusted_metadata: An arbitrary JSON object of application-specific data. These fields can be edited directly by the frontend SDK, and should not be used to store critical information. See the [Metadata resource](https://stytch.com/docs/b2b/api/metadata) for complete field behavior details. - - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. The template must be a template - using our built-in customizations or a custom HTML email for Magic Links - Invite. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Invite”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/magic_links_email_discovery.py b/stytch/b2b/api/magic_links_email_discovery.py index 4cba0bf..a879563 100644 --- a/stytch/b2b/api/magic_links_email_discovery.py +++ b/stytch/b2b/api/magic_links_email_discovery.py @@ -41,9 +41,8 @@ def send( verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned. - pkce_code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - login_template_id: Use a custom template for discovery emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for discovery emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -87,9 +86,8 @@ async def send_async( verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned. - pkce_code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - login_template_id: Use a custom template for discovery emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for discovery emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/oauth.py b/stytch/b2b/api/oauth.py index f92c241..ff35286 100644 --- a/stytch/b2b/api/oauth.py +++ b/stytch/b2b/api/oauth.py @@ -74,7 +74,7 @@ def authenticate( - pkce_code_verifier: A base64url encoded one time secret used to validate that the request starts and ends on the same device. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -155,7 +155,7 @@ async def authenticate_async( - pkce_code_verifier: A base64url encoded one time secret used to validate that the request starts and ends on the same device. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/organizations_members.py b/stytch/b2b/api/organizations_members.py index acf83cb..093c4ba 100644 --- a/stytch/b2b/api/organizations_members.py +++ b/stytch/b2b/api/organizations_members.py @@ -882,14 +882,13 @@ def start_email_update( - login_redirect_url: The URL that the Member clicks from the login Email Magic Link. This URL should be an endpoint in the backend server that verifies the request by querying Stytch's authenticate endpoint and finishes the login. If this value is not passed, the default login redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. - delivery_method: The method that should be used to verify a member's new email address. The options are `EMAIL_MAGIC_LINK` or `EMAIL_OTP`. This field is optional, if no value is provided, `EMAIL_MAGIC_LINK` will be used. """ # noqa headers: Dict[str, str] = {} @@ -949,14 +948,13 @@ async def start_email_update_async( - login_redirect_url: The URL that the Member clicks from the login Email Magic Link. This URL should be an endpoint in the backend server that verifies the request by querying Stytch's authenticate endpoint and finishes the login. If this value is not passed, the default login redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be from Stytch's - built-in customizations or a custom HTML email for Magic Links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic Links - Login”. - delivery_method: The method that should be used to verify a member's new email address. The options are `EMAIL_MAGIC_LINK` or `EMAIL_OTP`. This field is optional, if no value is provided, `EMAIL_MAGIC_LINK` will be used. """ # noqa headers: Dict[str, str] = {} diff --git a/stytch/b2b/api/otp_email.py b/stytch/b2b/api/otp_email.py index 719b29a..5c8c242 100644 --- a/stytch/b2b/api/otp_email.py +++ b/stytch/b2b/api/otp_email.py @@ -49,9 +49,9 @@ def login_or_signup( Fields: - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - email_address: The email address of the Member. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Signup. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Signup”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -97,9 +97,9 @@ async def login_or_signup_async( Fields: - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - email_address: The email address of the Member. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Signup. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - signup_template_id: Use a custom template for signup emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Signup”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -174,7 +174,7 @@ def authenticate( `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored. Total custom claims size cannot exceed four kilobytes. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -253,7 +253,7 @@ async def authenticate_async( `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored. Total custom claims size cannot exceed four kilobytes. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/otp_email_discovery.py b/stytch/b2b/api/otp_email_discovery.py index 4fec889..2ee8717 100644 --- a/stytch/b2b/api/otp_email_discovery.py +++ b/stytch/b2b/api/otp_email_discovery.py @@ -36,8 +36,8 @@ def send( Fields: - email_address: The email address to start the discovery flow for. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -71,8 +71,8 @@ async def send_async( Fields: - email_address: The email address to start the discovery flow for. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/otp_sms.py b/stytch/b2b/api/otp_sms.py index 8e6147a..a1a315c 100644 --- a/stytch/b2b/api/otp_sms.py +++ b/stytch/b2b/api/otp_sms.py @@ -61,7 +61,7 @@ def send( - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - member_id: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - mfa_phone_number: The phone number to send the OTP to. If the Member already has a phone number, this argument is not needed. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -127,7 +127,7 @@ async def send_async( - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - member_id: Globally unique UUID that identifies a specific Member. The `member_id` is critical to perform operations on a Member, so be sure to preserve this value. You may use an external_id here if one is set for the member. - mfa_phone_number: The phone number to send the OTP to. If the Member already has a phone number, this argument is not needed. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/passwords.py b/stytch/b2b/api/passwords.py index a13b3de..d9b4a8a 100644 --- a/stytch/b2b/api/passwords.py +++ b/stytch/b2b/api/passwords.py @@ -420,7 +420,7 @@ def authenticate( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -499,7 +499,7 @@ async def authenticate_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/passwords_discovery_email.py b/stytch/b2b/api/passwords_discovery_email.py index 9b0daeb..16cdf5c 100644 --- a/stytch/b2b/api/passwords_discovery_email.py +++ b/stytch/b2b/api/passwords_discovery_email.py @@ -45,23 +45,23 @@ def reset_start( Fields: - email_address: The email address of the Member to start the email reset process for. - - reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying - Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used. - If you have not set a default `reset_password_redirect_url`, an error is returned. + - reset_password_redirect_url: The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - discovery_redirect_url: The URL that the end user clicks from the discovery Magic Link. This URL should be an endpoint in the backend server that verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned. - - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”. - reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes. - pkce_code_challenge: (no documentation yet) - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - verify_email_template_id: Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a - password reset flow. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Email Verification. + password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -111,23 +111,23 @@ async def reset_start_async( Fields: - email_address: The email address of the Member to start the email reset process for. - - reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying - Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used. - If you have not set a default `reset_password_redirect_url`, an error is returned. + - reset_password_redirect_url: The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - discovery_redirect_url: The URL that the end user clicks from the discovery Magic Link. This URL should be an endpoint in the backend server that verifies the request by querying Stytch's discovery authenticate endpoint and continues the flow. If this value is not passed, the default discovery redirect URL that you set in your Dashboard is used. If you have not set a default discovery redirect URL, an error is returned. - - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”. - reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes. - pkce_code_challenge: (no documentation yet) - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - verify_email_template_id: Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a - password reset flow. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Email Verification. + password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { diff --git a/stytch/b2b/api/passwords_email.py b/stytch/b2b/api/passwords_email.py index 9c2131b..1eb7eea 100644 --- a/stytch/b2b/api/passwords_email.py +++ b/stytch/b2b/api/passwords_email.py @@ -51,23 +51,23 @@ def reset_start( Fields: - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - email_address: The email address of the Member to start the email reset process for. - - reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying - Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used. - If you have not set a default `reset_password_redirect_url`, an error is returned. + - reset_password_redirect_url: The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes. - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - login_redirect_url: The URL that Members are redirected to upon clicking the "Log in without password" button in password reset emails. After Members are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the Member in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”. - verify_email_template_id: Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a - password reset flow. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Email Verification. + password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -118,23 +118,23 @@ async def reset_start_async( Fields: - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. - email_address: The email address of the Member to start the email reset process for. - - reset_password_redirect_url: The URL that the Member clicks from the reset password link. This URL should be an endpoint in the backend server that verifies the request by querying - Stytch's authenticate endpoint and finishes the reset password flow. If this value is not passed, the default `reset_password_redirect_url` that you set in your Dashboard is used. - If you have not set a default `reset_password_redirect_url`, an error is returned. + - reset_password_redirect_url: The URL that the Member is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - reset_password_expiration_minutes: Sets a time limit after which the email link to reset the member's password will no longer be valid. The minimum allowed expiration is 5 minutes and the maximum is 10080 minutes (7 days). By default, the expiration is 30 minutes. - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - login_redirect_url: The URL that Members are redirected to upon clicking the "Log in without password" button in password reset emails. After Members are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the Member in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Reset Password. + - reset_password_template_id: Use a custom template for reset password emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Reset Password”. - verify_email_template_id: Use a custom template for verification emails sent during password reset flows. When cross-organization passwords are enabled for your Project, this template will be used the first time a user sets a password via a - password reset flow. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Passwords - Email Verification. + password reset flow. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Email Verification”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -213,7 +213,7 @@ def reset( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -299,7 +299,7 @@ async def reset_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/passwords_existing_password.py b/stytch/b2b/api/passwords_existing_password.py index 0da65cf..4e70cd9 100644 --- a/stytch/b2b/api/passwords_existing_password.py +++ b/stytch/b2b/api/passwords_existing_password.py @@ -76,7 +76,7 @@ def reset( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -160,7 +160,7 @@ async def reset_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/passwords_session.py b/stytch/b2b/api/passwords_session.py index e20efec..1d6d114 100644 --- a/stytch/b2b/api/passwords_session.py +++ b/stytch/b2b/api/passwords_session.py @@ -55,7 +55,7 @@ def reset( `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored. Total custom claims size cannot exceed four kilobytes. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -119,7 +119,7 @@ async def reset_async( `session_duration_minutes`. Claims will be included on the Session object and in the JWT. To update a key in an existing Session, supply a new value. To delete a key, supply a null value. Custom claims made with reserved claims (`iss`, `sub`, `aud`, `exp`, `nbf`, `iat`, `jti`) will be ignored. Total custom claims size cannot exceed four kilobytes. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/api/rbac_organizations.py b/stytch/b2b/api/rbac_organizations.py index 5820349..1af3fc2 100644 --- a/stytch/b2b/api/rbac_organizations.py +++ b/stytch/b2b/api/rbac_organizations.py @@ -8,11 +8,8 @@ from typing import Any, Dict, Set, Union -from stytch.b2b.models.rbac import ( - OrgPolicy, - Policy as B2BPolicy, - PolicyResource, -) +from stytch.b2b.models.rbac import OrgPolicy +from stytch.b2b.models.rbac import Policy as B2BPolicy from stytch.b2b.models.rbac_organizations import ( GetOrgPolicyResponse, SetOrgPolicyResponse, @@ -33,7 +30,10 @@ def get_org_policy( self, organization_id: str, ) -> GetOrgPolicyResponse: - """Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models. + """ + The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access. + + Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models. This endpoint returns the organization-scoped roles that supplement the project-level RBAC policy. Organization policies allow you to define custom roles that are specific to individual organizations within your project. @@ -61,7 +61,10 @@ async def get_org_policy_async( self, organization_id: str, ) -> GetOrgPolicyResponse: - """Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models. + """ + The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access. + + Get the active RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy contains the roles that have been defined specifically for that organization, allowing for organization-specific permissioning models. This endpoint returns the organization-scoped roles that supplement the project-level RBAC policy. Organization policies allow you to define custom roles that are specific to individual organizations within your project. @@ -90,7 +93,10 @@ def set_org_policy( organization_id: str, org_policy: Union[OrgPolicy, Dict[str, Any]], ) -> SetOrgPolicyResponse: - """Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level. + """ + The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access. + + Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level. This endpoint allows you to create, update, or replace the organization-scoped roles for a given organization. Organization policies supplement the project-level RBAC policy with additional roles that are only applicable within the context of that specific organization. @@ -131,7 +137,10 @@ async def set_org_policy_async( organization_id: str, org_policy: OrgPolicy, ) -> SetOrgPolicyResponse: - """Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level. + """ + The organization RBAC policy feature is currently in private beta and must be enabled for your Workspace. Please contact Stytch support at support@stytch.com to request access. + + Set the RBAC Policy for a specific Organization within your Stytch Project. An Organization RBAC Policy allows you to define roles that are specific to that organization, providing fine-grained control over permissions at the organization level. This endpoint allows you to create, update, or replace the organization-scoped roles for a given organization. Organization policies supplement the project-level RBAC policy with additional roles that are only applicable within the context of that specific organization. diff --git a/stytch/b2b/api/sessions.py b/stytch/b2b/api/sessions.py index 301a65d..c933ef2 100644 --- a/stytch/b2b/api/sessions.py +++ b/stytch/b2b/api/sessions.py @@ -346,7 +346,7 @@ def exchange( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -422,7 +422,7 @@ async def exchange_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -463,8 +463,6 @@ def exchange_access_token( The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time. - The Member Session returned will be the same Member Session that was active in your application (the authorizing party) during the initial authorization flow. - Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA. Fields: @@ -512,8 +510,6 @@ async def exchange_access_token_async( The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time. - The Member Session returned will be the same Member Session that was active in your application (the authorizing party) during the initial authorization flow. - Because the Member previously completed MFA and satisfied all Organization authentication requirements at the time of the original Access Token issuance, this endpoint will never return an `intermediate_session_token` or require MFA. Fields: diff --git a/stytch/b2b/api/sso.py b/stytch/b2b/api/sso.py index 12df949..155fe36 100644 --- a/stytch/b2b/api/sso.py +++ b/stytch/b2b/api/sso.py @@ -186,7 +186,7 @@ def authenticate( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -266,7 +266,7 @@ async def authenticate_async( Total custom claims size cannot exceed four kilobytes. - locale: If the Member needs to complete an MFA step, and the Member has a phone number, this endpoint will pre-emptively send a one-time passcode (OTP) to the Member's phone number. The locale argument will be used to determine which language to use when sending the passcode. - Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/b2b/client.py b/stytch/b2b/client.py index d58e12f..4c566b7 100644 --- a/stytch/b2b/client.py +++ b/stytch/b2b/client.py @@ -47,8 +47,8 @@ def __init__( secret: str, environment: Optional[str] = None, suppress_warnings: bool = False, - async_session: Optional[aiohttp.ClientSession] = None, sync_session: Optional[requests.Session] = None, + async_session: Optional[aiohttp.ClientSession] = None, fraud_environment: Optional[str] = None, custom_base_url: Optional[str] = None, ): @@ -57,8 +57,8 @@ def __init__( secret=secret, environment=environment, suppress_warnings=suppress_warnings, - async_session=async_session, sync_session=sync_session, + async_session=async_session, fraud_environment=fraud_environment, custom_base_url=custom_base_url, ) diff --git a/stytch/b2b/models/discovery_organizations.py b/stytch/b2b/models/discovery_organizations.py index 062d186..d3c94aa 100644 --- a/stytch/b2b/models/discovery_organizations.py +++ b/stytch/b2b/models/discovery_organizations.py @@ -60,10 +60,10 @@ class CreateResponse(ResponseBase): - session_token: A secret token for a given Stytch Session. - session_jwt: The JSON Web Token (JWT) for a given Stytch Session. - member: The [Member object](https://stytch.com/docs/b2b/api/member-object) + - organization: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). - member_authenticated: Indicates whether the Member is fully authenticated. If false, the Member needs to complete an MFA step to log in to the Organization. - intermediate_session_token: The returned Intermediate Session Token is identical to the one that was originally passed in to the request. If this value is non-empty, the member must complete an MFA step to finish logging in to the Organization. The token can be used with the [OTP SMS Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-otp-sms), [TOTP Authenticate endpoint](https://stytch.com/docs/b2b/api/authenticate-totp), or [Recovery Codes Recover endpoint](https://stytch.com/docs/b2b/api/recovery-codes-recover) to complete an MFA flow and log in to the Organization. The token has a default expiry of 10 minutes. It can also be used with the [Exchange Intermediate Session endpoint](https://stytch.com/docs/b2b/api/exchange-intermediate-session) to join a specific Organization that allows the factors represented by the intermediate session token; or the [Create Organization via Discovery endpoint](https://stytch.com/docs/b2b/api/create-organization-via-discovery) to create a new Organization and Member. Intermediate Session Tokens have a default expiry of 10 minutes. - member_session: The [Session object](https://stytch.com/docs/b2b/api/session-object). - - organization: The [Organization object](https://stytch.com/docs/b2b/api/organization-object). - mfa_required: Information about the MFA requirements of the Organization and the Member's options for fulfilling MFA. - primary_required: Information about the primary authentication requirements of the Organization. - member_device: If a valid `telemetry_id` was passed in the request and the [Fingerprint Lookup API](https://stytch.com/docs/fraud/api/fingerprint-lookup) returned results, the `member_device` response field will contain information about the member's device attributes. @@ -73,10 +73,10 @@ class CreateResponse(ResponseBase): session_token: str session_jwt: str member: Member + organization: Organization member_authenticated: bool intermediate_session_token: str member_session: Optional[MemberSession] = None - organization: Optional[Organization] = None mfa_required: Optional[MfaRequired] = None primary_required: Optional[PrimaryRequired] = None member_device: Optional[DeviceInfo] = None diff --git a/stytch/b2b/models/organizations.py b/stytch/b2b/models/organizations.py index c54cd5b..eb6ddf1 100644 --- a/stytch/b2b/models/organizations.py +++ b/stytch/b2b/models/organizations.py @@ -388,7 +388,12 @@ class Organization(pydantic.BaseModel): - allowed_auth_methods: An array of allowed authentication methods. This list is enforced when `auth_methods` is set to `RESTRICTED`. The list's accepted values are: `sso`, `magic_link`, `email_otp`, `password`, `google_oauth`, `microsoft_oauth`, `slack_oauth`, `github_oauth`, and `hubspot_oauth`. - - mfa_policy: (no documentation yet) + - mfa_policy: The setting that controls the MFA policy for all Members in the Organization. The accepted values are: + + `REQUIRED_FOR_ALL` – All Members within the Organization will be required to complete MFA every time they wish to log in. However, any active Session that existed prior to this setting change will remain valid. + + `OPTIONAL` – The default value. The Organization does not require MFA by default for all Members. Members will be required to complete MFA only if their `mfa_enrolled` status is set to true. + - rbac_email_implicit_role_assignments: Implicit role assignments based off of email domains. For each domain-Role pair, all Members whose email addresses have the specified email domain will be granted the associated Role, regardless of their login method. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) @@ -408,7 +413,7 @@ class Organization(pydantic.BaseModel): `NOT_ALLOWED` – the default setting, disables JIT provisioning by OAuth Tenant. - - claimed_email_domains: (no documentation yet) + - claimed_email_domains: A list of email domains that are claimed by the Organization. - first_party_connected_apps_allowed_type: The authentication setting that sets the Organization's policy towards first party Connected Apps. The accepted values are: `ALL_ALLOWED` – the default setting, any first party Connected App in the Project is permitted for use by Members. @@ -557,7 +562,7 @@ class Member(pydantic.BaseModel): - is_admin: Whether or not the Member has the `stytch_admin` Role. This Role is automatically granted to Members who create an Organization through the [discovery flow](https://stytch.com/docs/b2b/api/create-organization-via-discovery). See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for more details on this Role. - - totp_registration_id: (no documentation yet) + - totp_registration_id: Globally unique UUID that identifies a TOTP instance. - retired_email_addresses: A list of retired email addresses for this member. A previously active email address can be marked as retired in one of two ways: @@ -569,10 +574,10 @@ class Member(pydantic.BaseModel): addresses allows them to be subsequently re-used by other Organization Members. Retired email addresses can be unlinked using the [Unlink Retired Email endpoint](https://stytch.com/docs/b2b/api/unlink-retired-member-email). - - is_locked: (no documentation yet) + - is_locked: Whether the Member is temporarily locked due to too many failed authentication attempts. See the [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information. - mfa_enrolled: Sets whether the Member is enrolled in MFA. If true, the Member must complete an MFA step whenever they wish to log in to their Organization. If false, the Member only needs to complete an MFA step if the Organization's MFA policy is set to `REQUIRED_FOR_ALL`. - mfa_phone_number: The Member's phone number. A Member may only have one phone number. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). - - default_mfa_method: (no documentation yet) + - default_mfa_method: The Member's default MFA method. This value is used to determine which secondary MFA method to use in the case of multiple methods registered for a Member. The current possible values are `sms_otp` and `totp`. - roles: Explicit or implicit Roles assigned to this Member, along with details about the role assignment source. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. - trusted_metadata: An arbitrary JSON object for storing application-specific data or identity-provider-specific data. @@ -583,8 +588,8 @@ class Member(pydantic.BaseModel): - updated_at: The timestamp of when the Member was last updated. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. - scim_registration: A scim member registration, referencing a [SCIM Connection](https://stytch.com/docs/b2b/api/scim-connection-object) object in use for the Member creation. - external_id: The ID of the member given by the identity provider. - - lock_created_at: (no documentation yet) - - lock_expires_at: (no documentation yet) + - lock_created_at: When the member lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. + - lock_expires_at: When the member lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. """ # noqa organization_id: str diff --git a/stytch/b2b/models/passwords.py b/stytch/b2b/models/passwords.py index c20e0eb..5331299 100644 --- a/stytch/b2b/models/passwords.py +++ b/stytch/b2b/models/passwords.py @@ -120,13 +120,14 @@ class StrengthCheckResponse(ResponseBase): Fields: - valid_password: Returns `true` if the password passes our password validation. We offer two validation options, [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication. - We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy). If an email address is included in the call we also + We also offer [LUDS](https://stytch.com/docs/b2b/guides/passwords/strength-policy) which is less sophisticated + but easier to understand. If an email address is included in the call we also require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/) - score: The score of the password determined by [zxcvbn](https://github.com/dropbox/zxcvbn). Values will be between 1 and 4, a 3 or greater is required to pass validation. - breached_password: Returns `true` if the password has been breached. Powered by [HaveIBeenPwned](https://haveibeenpwned.com/). - strength_policy: The strength policy type enforced, either `zxcvbn` or `luds`. - breach_detection_on_create: Will return `true` if breach detection will be evaluated. By default this option is enabled. - This option can be disabled by contacting [support@stytch.com](mailto:support@stytch.com?subject=Password%20strength%20configuration). + This option can be disabled in the [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection). If this value is false then `breached_password` will always be `false` as well. - luds_feedback: Feedback for how to improve the password's strength using [luds](https://stytch.com/docs/guides/passwords/strength-policy). - zxcvbn_feedback: Feedback for how to improve the password's strength using [zxcvbn](https://stytch.com/docs/b2b/guides/passwords/strength-policy). diff --git a/stytch/b2b/models/rbac.py b/stytch/b2b/models/rbac.py index 65991c1..a8e0eb3 100644 --- a/stytch/b2b/models/rbac.py +++ b/stytch/b2b/models/rbac.py @@ -132,11 +132,35 @@ class OrgPolicy(pydantic.BaseModel): class PolicyScopePermission(pydantic.BaseModel): + """ + Fields: + - resource_id: A unique identifier of the RBAC Resource, provided by the developer and intended to be human-readable. + + A `resource_id` is not allowed to start with `stytch`, which is a special prefix used for Stytch default Resources with reserved `resource_id`s. These include: + + * `stytch.organization` + * `stytch.member` + * `stytch.sso` + * `stytch.self` + + Check out the [guide on Stytch default Resources](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more detailed explanation. + + + - actions: A list of permitted actions the Scope is required to take with the provided Resource. You can use `*` as a wildcard to require a Scope permission to use all possible actions related to the Resource. + """ # noqa + resource_id: str actions: List[str] class PolicyScope(pydantic.BaseModel): + """ + Fields: + - scope: The unique identifier of the RBAC Scope, provided by the developer and intended to be human-readable. + - description: The description of the RBAC Scope. + - permissions: A list of permissions that link a [Resource](https://stytch.com/docs/b2b/api/rbac-resource-object) to a list of actions. + """ # noqa + scope: str description: str permissions: List[PolicyScopePermission] @@ -147,7 +171,7 @@ class Policy(pydantic.BaseModel): Fields: - roles: An array of [Role objects](https://stytch.com/docs/b2b/api/rbac-role-object). - resources: An array of [Resource objects](https://stytch.com/docs/b2b/api/rbac-resource-object). - - scopes: (no documentation yet) + - scopes: An array of [Scope objects](https://stytch.com/docs/b2b/api/rbac-scope-object). """ # noqa roles: List[PolicyRole] diff --git a/stytch/b2b/models/scim.py b/stytch/b2b/models/scim.py index 413ac7e..6cf0008 100644 --- a/stytch/b2b/models/scim.py +++ b/stytch/b2b/models/scim.py @@ -104,12 +104,36 @@ class SCIMGroup(pydantic.BaseModel): class SCIMGroupImplicitRoleAssignments(pydantic.BaseModel): + """ + Fields: + - role_id: The ID of the role. + - group_id: The ID of the group. + - group_name: (no documentation yet) + """ # noqa + role_id: str group_id: str group_name: str class SCIMConnection(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: The ID of the SCIM connection. + - status: The status of the connection. The possible values are deleted or active. + - display_name: A human-readable display name for the connection. + - identity_provider: Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, `pingfederate`, `rippling` or `generic`. + + Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + - base_url: The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API endpoints + - bearer_token_last_four: The last four digits of the bearer token. If you've lost access to your `bearer_token` and need to generate a new one, use the [SCIM rotate token start endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-start). + - scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + - next_bearer_token_last_four: (no documentation yet) + - bearer_token_expires_at: The bearer token expiry time. + - next_bearer_token_expires_at: This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). The next bearer token expiry time. + """ # noqa + organization_id: str connection_id: str status: str @@ -124,6 +148,23 @@ class SCIMConnection(pydantic.BaseModel): class SCIMConnectionWithNextToken(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: The ID of the SCIM connection. + - status: The status of the connection. The possible values are deleted or active. + - display_name: A human-readable display name for the connection. + - base_url: The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API endpoints + - identity_provider: Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, `pingfederate`, `rippling` or `generic`. + + Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + - bearer_token_last_four: The last four digits of the bearer token. If you've lost access to your `bearer_token` and need to generate a new one, use the [SCIM rotate token start endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-start). + - next_bearer_token: This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). This token should be used as the new bearer token for the SCIM connection after token rotation has been completed using the [SCIM rotate token complete endpoint](https://stytch.com/docs/b2b/api/scim-rotate-token-complete). + - scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + - bearer_token_expires_at: The bearer token expiry time. + - next_bearer_token_expires_at: This field is supplied only during [token rotation](https://stytch.com/docs/b2b/api/scim-rotate-token-start). The next bearer token expiry time. + """ # noqa + organization_id: str connection_id: str status: str @@ -138,6 +179,21 @@ class SCIMConnectionWithNextToken(pydantic.BaseModel): class SCIMConnectionWithToken(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: The ID of the SCIM connection. + - status: The status of the connection. The possible values are deleted or active. + - display_name: A human-readable display name for the connection. + - identity_provider: Name of the IdP. Enum with possible values: `okta`, `microsoft-entra`, `cyberark`, `jumpcloud`, `onelogin`, `pingfederate`, `rippling` or `generic`. + + Specifying a known provider allows Stytch to handle any provider-specific logic, such as automatically appending `?aadOptscim062020` to the returned BaseURL for `microsoft-entra` SCIM Connections to [enable the SCIM 2.0 compliant flag](https://learn.microsoft.com/en-us/entra/identity/app-provisioning/application-provisioning-config-problem-scim-compatibility#scim-20-compliance-issues-and-status). + - base_url: The URL supplied to the Identity Provider (IdP) alongside the bearer token enabling access to Stytch's SCIM API endpoints + - bearer_token: The token supplied to the Identity Provider (IdP) alongside the base URL that grants access to Stytch's SCIM API endpoints. It should be included in HTTP authorization headers. This field is supplied only on creation of the SCIM connection. + - scim_group_implicit_role_assignments: An array of SCIM group implicit role assignments. Each object in the array must contain a `group_id` and a `role_id`. + - bearer_token_expires_at: The bearer token expiry time. + """ # noqa + organization_id: str connection_id: str status: str diff --git a/stytch/b2b/models/scim_connection.py b/stytch/b2b/models/scim_connection.py index d7126b9..c391cc4 100644 --- a/stytch/b2b/models/scim_connection.py +++ b/stytch/b2b/models/scim_connection.py @@ -174,7 +174,7 @@ def add_headers(self, headers: Dict[str, str]) -> Dict[str, str]: class CreateResponse(ResponseBase): """Response type for `Connection.create`. Fields: - - connection: The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnectionWithToken] = None @@ -203,7 +203,7 @@ class GetGroupsResponse(ResponseBase): class GetResponse(ResponseBase): """Response type for `Connection.get`. Fields: - - connection: A [SCIM Connection](https://stytch.com/docs/b2b/api/scim-connection-object) connection belonging to the organization (currently limited to one). + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnection] = None @@ -212,7 +212,7 @@ class GetResponse(ResponseBase): class RotateCancelResponse(ResponseBase): """Response type for `Connection.rotate_cancel`. Fields: - - connection: The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnection] = None @@ -221,7 +221,7 @@ class RotateCancelResponse(ResponseBase): class RotateCompleteResponse(ResponseBase): """Response type for `Connection.rotate_complete`. Fields: - - connection: The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnection] = None @@ -230,7 +230,7 @@ class RotateCompleteResponse(ResponseBase): class RotateStartResponse(ResponseBase): """Response type for `Connection.rotate_start`. Fields: - - connection: The `SCIM Connection` object affected by this API call. See the [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object) for complete response field details. + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnectionWithNextToken] = None @@ -239,7 +239,7 @@ class RotateStartResponse(ResponseBase): class UpdateResponse(ResponseBase): """Response type for `Connection.update`. Fields: - - connection: The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + - connection: The [SCIM Connection Object](https://stytch.com/docs/b2b/api/scim-connection-object). """ # noqa connection: Optional[SCIMConnection] = None diff --git a/stytch/b2b/models/sso.py b/stytch/b2b/models/sso.py index c27232a..f426cb8 100644 --- a/stytch/b2b/models/sso.py +++ b/stytch/b2b/models/sso.py @@ -32,6 +32,20 @@ class AuthenticateRequestLocale(str, enum.Enum): class ConnectionImplicitRoleAssignment(pydantic.BaseModel): + """ + Fields: + - role_id: The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable. + + Reserved `role_id`s that are predefined by Stytch include: + + * `stytch_member` + * `stytch_admin` + + Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more detailed explanation. + + + """ # noqa + role_id: str @@ -79,6 +93,21 @@ class GroupImplicitRoleAssignment(pydantic.BaseModel): class Connection(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: Globally unique UUID that identifies a specific External SSO Connection. + - external_organization_id: Globally unique UUID that identifies a different Organization within your Project. + - external_connection_id: Globally unique UUID that identifies a specific SSO connection configured for a different Organization in your Project. + - display_name: A human-readable display name for the connection. + - status: The status of the connection. External connections are always active. + - external_connection_implicit_role_assignments: All Members who log in with this External connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. Implicit role assignments are not supported for External connections if the underlying SSO connection is an OIDC connection. + - external_group_implicit_role_assignments: Defines the names of the groups + that grant specific role assignments. For each group-Role pair, if a Member logs in with this external connection and + belongs to the specified group, they will be granted the associated Role. See the + [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + """ # noqa + organization_id: str connection_id: str external_organization_id: str @@ -92,6 +121,27 @@ class Connection(pydantic.BaseModel): class OIDCConnection(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: Globally unique UUID that identifies a specific OIDC Connection. + - status: The status of the connection. The possible values are pending or active. See the [Update OIDC Connection endpoint](https://stytch.com/docs/b2b/api/update-oidc-connection) for more details. + - display_name: A human-readable display name for the connection. + - redirect_url: The callback URL for this OIDC connection. This value will be passed to the IdP to redirect the Member back to Stytch after a sign-in attempt. + - client_id: The OAuth2.0 client ID used to authenticate login attempts. This will be provided by the IdP. + - client_secret: The secret belonging to the OAuth2.0 client used to authenticate login attempts. This will be provided by the IdP. + - issuer: A case-sensitive `https://` URL that uniquely identifies the IdP. This will be provided by the IdP. + - authorization_url: The location of the URL that starts an OAuth login at the IdP. This will be provided by the IdP. + - token_url: The location of the URL that issues OAuth2.0 access tokens and OIDC ID tokens. This will be provided by the IdP. + - userinfo_url: The location of the IDP's [UserInfo Endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo). This will be provided by the IdP. + - jwks_url: The location of the IdP's JSON Web Key Set, used to verify credentials issued by the IdP. This will be provided by the IdP. + - identity_provider: Name of the IdP. Enum with possible values: `classlink`, `cyberark`, `duo`, `google-workspace`, `jumpcloud`, `keycloak`, `miniorange`, `microsoft-entra`, `okta`, `onelogin`, `pingfederate`, `rippling`, `salesforce`, `shibboleth`, or `generic`. + + Specifying a known provider allows Stytch to handle any provider-specific logic. + - custom_scopes: A space-separated list of custom scopes that will be requested on every SSOStart call. If set, this value will replace the default set of OIDC scopes requested: `openid email profile`. Additional scopes can be requested using the `custom_scopes` query parameter on individual SSOStart calls. + - attribute_mapping: An object that represents the attributes used to identify a Member. This object will map the IdP-defined User attributes to Stytch-specific values, which will appear on the member's Trusted Metadata. + """ # noqa + organization_id: str connection_id: str status: str @@ -110,6 +160,20 @@ class OIDCConnection(pydantic.BaseModel): class SAMLConnectionImplicitRoleAssignment(pydantic.BaseModel): + """ + Fields: + - role_id: The unique identifier of the RBAC Role, provided by the developer and intended to be human-readable. + + Reserved `role_id`s that are predefined by Stytch include: + + * `stytch_member` + * `stytch_admin` + + Check out the [guide on Stytch default Roles](https://stytch.com/docs/b2b/guides/rbac/stytch-default) for a more detailed explanation. + + + """ # noqa + role_id: str @@ -119,6 +183,16 @@ class SAMLGroupImplicitRoleAssignment(pydantic.BaseModel): class X509Certificate(pydantic.BaseModel): + """ + Fields: + - certificate_id: The ID of the certificate. + - certificate: The certificate, in [PEM](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail) format. + - issuer: The issuer of the certificate. For signing certificates, this value will be "Stytch". + - created_at: A timestamp that indicates when the certificate was created. + - expires_at: A timestamp that indicates when the certificate will expire. + - updated_at: A timestamp that indicates when the certificate was updated. + """ # noqa + certificate_id: str certificate: str issuer: str @@ -128,6 +202,35 @@ class X509Certificate(pydantic.BaseModel): class SAMLConnection(pydantic.BaseModel): + """ + Fields: + - organization_id: Globally unique UUID that identifies a specific Organization. The `organization_id` is critical to perform operations on an Organization, so be sure to preserve this value. You may also use the organization_slug or organization_external_id here as a convenience. + - connection_id: Globally unique UUID that identifies a specific SAML Connection. + - status: The status of the connection. The possible values are pending or active. See the [Update SAML Connection endpoint](https://stytch.com/docs/b2b/api/update-saml-connection) for more details. + - idp_entity_id: A globally unique name for the IdP. This will be provided by the IdP. + - display_name: A human-readable display name for the connection. + - idp_sso_url: The URL for which assertions for login requests will be sent. This will be provided by the IdP. + - acs_url: The URL of the Assertion Consumer Service. This value will be passed to the IdP to redirect the Member back to Stytch after a sign-in attempt. Read our [SAML Overview](https://stytch.com/docs/b2b/api/saml-overview) for more info. + - audience_uri: The URL of the Audience Restriction. This value will indicate that Stytch is the intended audience of an assertion. Read our [SAML Overview](https://stytch.com/docs/b2b/api/saml-overview) for more info. + - signing_certificates: A list of X.509 certificates Stytch will use to sign its assertion requests. Certificates should be uploaded to the IdP. + - verification_certificates: A list of X.509 certificates Stytch will use to validate an assertion callback. Certificates should be populated from the IdP. + - encryption_private_keys: (no documentation yet) + - saml_connection_implicit_role_assignments: All Members who log in with this SAML connection will implicitly receive the specified Roles. See the [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + - saml_group_implicit_role_assignments: Defines the names of the SAML groups + that grant specific role assignments. For each group-Role pair, if a Member logs in with this SAML connection and + belongs to the specified SAML group, they will be granted the associated Role. See the + [RBAC guide](https://stytch.com/docs/b2b/guides/rbac/role-assignment) for more information about role assignment. + - alternative_audience_uri: An alternative URL to use for the Audience Restriction. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Read our [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info. + - identity_provider: Name of the IdP. Enum with possible values: `classlink`, `cyberark`, `duo`, `google-workspace`, `jumpcloud`, `keycloak`, `miniorange`, `microsoft-entra`, `okta`, `onelogin`, `pingfederate`, `rippling`, `salesforce`, `shibboleth`, or `generic`. + + Specifying a known provider allows Stytch to handle any provider-specific logic. + - nameid_format: The NameID format the SAML Connection expects to use. Defaults to `urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress`. + - alternative_acs_url: An alternative URL to use for the `AssertionConsumerServiceURL` in SP initiated SAML AuthNRequests. This value can be used when you wish to migrate an existing SAML integration to Stytch with zero downtime. Note that you will be responsible for proxying requests sent to the Alternative ACS URL to Stytch. Read our [SSO migration guide](https://stytch.com/docs/b2b/guides/migrations/additional-migration-considerations) for more info. + - idp_initiated_auth_disabled: Determines whether IDP initiated auth is allowed for a given SAML connection. Defaults to false (IDP Initiated Auth is enabled). + - allow_gateway_callback: (no documentation yet) + - attribute_mapping: An object that represents the attributes used to identify a Member. This object will map the IdP-defined User attributes to Stytch-specific values. Required attributes: `email` and one of `full_name` or `first_name` and `last_name`. + """ # noqa + organization_id: str connection_id: str status: str diff --git a/stytch/b2b/models/sso_external.py b/stytch/b2b/models/sso_external.py index a1ea828..7be4079 100644 --- a/stytch/b2b/models/sso_external.py +++ b/stytch/b2b/models/sso_external.py @@ -50,7 +50,7 @@ def add_headers(self, headers: Dict[str, str]) -> Dict[str, str]: class CreateConnectionResponse(ResponseBase): """Response type for `External.create_connection`. Fields: - - connection: The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details. + - connection: The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object). """ # noqa connection: Optional[Connection] = None @@ -59,7 +59,7 @@ class CreateConnectionResponse(ResponseBase): class UpdateConnectionResponse(ResponseBase): """Response type for `External.update_connection`. Fields: - - connection: The `External Connection` object affected by this API call. See the [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object) for complete response field details. + - connection: The [External Connection Object](https://stytch.com/docs/b2b/api/external-connection-object). """ # noqa connection: Optional[Connection] = None diff --git a/stytch/b2b/models/sso_oidc.py b/stytch/b2b/models/sso_oidc.py index 1b7b2aa..510eb5f 100644 --- a/stytch/b2b/models/sso_oidc.py +++ b/stytch/b2b/models/sso_oidc.py @@ -87,7 +87,7 @@ def add_headers(self, headers: Dict[str, str]) -> Dict[str, str]: class CreateConnectionResponse(ResponseBase): """Response type for `OIDC.create_connection`. Fields: - - connection: The `OIDC Connection` object affected by this API call. See the [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object) for complete response field details. + - connection: The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object). """ # noqa connection: Optional[OIDCConnection] = None @@ -96,7 +96,7 @@ class CreateConnectionResponse(ResponseBase): class UpdateConnectionResponse(ResponseBase): """Response type for `OIDC.update_connection`. Fields: - - connection: The `OIDC Connection` object affected by this API call. See the [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object) for complete response field details. + - connection: The [OIDC Connection Object](https://stytch.com/docs/b2b/api/oidc-connection-object). - warning: If it is not possible to resolve the well-known metadata document from the OIDC issuer, this field will explain what went wrong if the request is successful otherwise. In other words, even if the overall request succeeds, there could be relevant warnings related to the connection update. """ # noqa diff --git a/stytch/b2b/models/sso_saml.py b/stytch/b2b/models/sso_saml.py index d6e8ddd..77f47a6 100644 --- a/stytch/b2b/models/sso_saml.py +++ b/stytch/b2b/models/sso_saml.py @@ -135,7 +135,7 @@ def add_headers(self, headers: Dict[str, str]) -> Dict[str, str]: class CreateConnectionResponse(ResponseBase): """Response type for `SAML.create_connection`. Fields: - - connection: The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + - connection: The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) """ # noqa connection: Optional[SAMLConnection] = None @@ -162,7 +162,7 @@ class DeleteVerificationCertificateResponse(ResponseBase): class UpdateByURLResponse(ResponseBase): """Response type for `SAML.update_by_url`. Fields: - - connection: The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + - connection: The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) """ # noqa connection: Optional[SAMLConnection] = None @@ -171,7 +171,7 @@ class UpdateByURLResponse(ResponseBase): class UpdateConnectionResponse(ResponseBase): """Response type for `SAML.update_connection`. Fields: - - connection: The `SAML Connection` object affected by this API call. See the [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) for complete response field details. + - connection: The [SAML Connection Object](https://stytch.com/docs/b2b/api/saml-connection-object) """ # noqa connection: Optional[SAMLConnection] = None diff --git a/stytch/consumer/api/m2m_clients.py b/stytch/consumer/api/m2m_clients.py index 2407022..d86616d 100644 --- a/stytch/consumer/api/m2m_clients.py +++ b/stytch/consumer/api/m2m_clients.py @@ -142,9 +142,9 @@ def update( scopes: Optional[List[str]] = None, trusted_metadata: Optional[Dict[str, Any]] = None, ) -> UpdateResponse: - """Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. + """Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. - **Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. + **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). Fields: @@ -183,9 +183,9 @@ async def update_async( scopes: Optional[List[str]] = None, trusted_metadata: Optional[Dict[str, Any]] = None, ) -> UpdateResponse: - """Updates an existing M2M Client. You can use this endpoint to activate or deactivate a M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. + """Updates an existing M2M Client. You can use this endpoint to activate or deactivate an M2M Client by changing its `status`. A deactivated M2M Client will not be allowed to perform future token exchange flows until it is reactivated. - **Important:** Deactivating a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. + **Important:** Deactivating an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). Fields: @@ -221,7 +221,7 @@ def delete( ) -> DeleteResponse: """Deletes the M2M Client. - **Important:** Deleting a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. + **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). Fields: @@ -242,7 +242,7 @@ async def delete_async( ) -> DeleteResponse: """Deletes the M2M Client. - **Important:** Deleting a M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. + **Important:** Deleting an M2M Client will not invalidate any existing JWTs issued to the client, only prevent it from receiving new ones. To protect more-sensitive routes, pass a lower `max_token_age` value when[authenticating the token](https://stytch.com/docs/b2b/api/authenticate-m2m-token)[authenticating the token](https://stytch.com/docs/api/authenticate-m2m-token). Fields: diff --git a/stytch/consumer/api/magic_links.py b/stytch/consumer/api/magic_links.py index 952b014..43c972a 100644 --- a/stytch/consumer/api/magic_links.py +++ b/stytch/consumer/api/magic_links.py @@ -170,12 +170,22 @@ def create( expiration_minutes: Optional[int] = None, attributes: Optional[Union[Attributes, Dict[str, Any]]] = None, ) -> CreateResponse: - """Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a note at support@stytch.com. + """Create an Embeddable Magic Link token for a User. - ### Next steps - Send the returned `token` value to the end user in a link which directs to your application. When the end user follows your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication. + ### Important usage notes - **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token. + Carefully review the following notes before using Embeddable Magic Links: + + * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely. + * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone number) as verified, since we cannot confirm how the token was sent to the user. + * Embeddable Magic Links are only available in our Consumer API, and not our B2B API. + + When sending Embeddable Magic Links via email: + + * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes can result in your emails being sent to spam. + * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic Links product automatically prevents this (details [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview). + + We also recommend checking out our [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which is available in both our Consumer and B2B APIs and can be a better fit for some use cases. Fields: - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. @@ -203,12 +213,22 @@ async def create_async( expiration_minutes: Optional[int] = None, attributes: Optional[Attributes] = None, ) -> CreateResponse: - """Create an Embeddable Magic Link token for a User. Access to this endpoint is restricted. To enable it, please send us a note at support@stytch.com. + """Create an Embeddable Magic Link token for a User. + + ### Important usage notes + + Carefully review the following notes before using Embeddable Magic Links: + + * Embeddable Magic Link tokens are **sensitive values**. You should handle and store them securely. + * Authenticating an Embeddable Magic Link token will not mark any of a user's delivery factors (email address or phone number) as verified, since we cannot confirm how the token was sent to the user. + * Embeddable Magic Links are only available in our Consumer API, and not our B2B API. + + When sending Embeddable Magic Links via email: - ### Next steps - Send the returned `token` value to the end user in a link which directs to your application. When the end user follows your link, collect the token, and call [Authenticate Magic Link](https://stytch.com/docs/api/authenticate-magic-link) to complete authentication. + * Deliverability is paramount. Carefully test your email copy to ensure it reaches your users' inboxes. Small changes can result in your emails being sent to spam. + * In some cases, email security bots may follow links within incoming emails before your users open them. This consumes the Embeddable Magic Link token, preventing the user from logging in when they later click the link. Our Email Magic Links product automatically prevents this (details [here](https://stytch.com/docs/consumer-auth/authentication/magic-links/redirect-routing)). However, when sending your own emails containing Embeddable Magic Links, you'll be responsible for detecting and stopping bot traffic using tools like CAPTCHA or [Device Fingerprinting](https://stytch.com/docs/fraud-risk/device-fingerprinting/overview). - **Note:** Authenticating an Embeddable Magic Link token will **not** result in any of the Stytch User's factors (email address or phone number) being marked as verified, as Stytch cannot confirm where the user received the token. + We also recommend checking out our [Trusted Auth Tokens](https://stytch.com/docs/consumer-auth/authentication/trusted-auth-tokens/overview) product, which is available in both our Consumer and B2B APIs and can be a better fit for some use cases. Fields: - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. diff --git a/stytch/consumer/api/magic_links_email.py b/stytch/consumer/api/magic_links_email.py index 44403b1..bb65089 100644 --- a/stytch/consumer/api/magic_links_email.py +++ b/stytch/consumer/api/magic_links_email.py @@ -57,7 +57,7 @@ def send( Fields: - email: The email address of the User to send the Magic Link to. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - login_magic_link_url: The URL the end user clicks from the login Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and log in the User. If this value is not passed, the default login redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned. - signup_magic_link_url: The URL the end user clicks from the sign-up Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and sign-up the User. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. @@ -67,13 +67,13 @@ def send( - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. - session_token: The `session_token` of the user to associate the email with. - session_jwt: The `session_jwt` of the user to associate the email with. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -136,7 +136,7 @@ async def send_async( Fields: - email: The email address of the User to send the Magic Link to. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - login_magic_link_url: The URL the end user clicks from the login Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and log in the User. If this value is not passed, the default login redirect URL that you set in your Dashboard is used. If you have not set a default login redirect URL, an error is returned. - signup_magic_link_url: The URL the end user clicks from the sign-up Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and sign-up the User. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. @@ -146,13 +146,13 @@ async def send_async( - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. - session_token: The `session_token` of the user to associate the email with. - session_jwt: The `session_jwt` of the user to associate the email with. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -214,8 +214,8 @@ def login_or_create( - signup_magic_link_url: The URL the end user clicks from the sign-up Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and sign-up the User. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - login_expiration_minutes: Set the expiration for the login email magic link, in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - signup_expiration_minutes: Set the expiration for the sign-up email magic link, in minutes. By default, it expires in 1 week. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - create_user_as_pending: Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false. If true, users will be saved with status pending in Stytch's backend until authenticated. @@ -223,7 +223,7 @@ def login_or_create( a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -286,8 +286,8 @@ async def login_or_create_async( - signup_magic_link_url: The URL the end user clicks from the sign-up Email Magic Link. This should be a URL that your app receives and parses and subsequently send an API request to authenticate the Magic Link and sign-up the User. If this value is not passed, the default sign-up redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - login_expiration_minutes: Set the expiration for the login email magic link, in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - signup_expiration_minutes: Set the expiration for the sign-up email magic link, in minutes. By default, it expires in 1 week. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - create_user_as_pending: Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false. If true, users will be saved with status pending in Stytch's backend until authenticated. @@ -295,7 +295,7 @@ async def login_or_create_async( a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -352,12 +352,12 @@ def invite( Fields: - email: The email address of the User to send the invite Magic Link to. - - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Invite. + - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Invite”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - name: The name of the user. Each field in the name object is optional. - invite_magic_link_url: The URL the end user clicks from the Email Magic Link. This should be a URL that your app receives and parses and subsequently sends an API request to authenticate the Magic Link and log in the User. If this value is not passed, the default invite redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - invite_expiration_minutes: Set the expiration for the email magic link, in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -412,12 +412,12 @@ async def invite_async( Fields: - email: The email address of the User to send the invite Magic Link to. - - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Invite. + - invite_template_id: Use a custom template for invite emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Invite”. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - name: The name of the user. Each field in the name object is optional. - invite_magic_link_url: The URL the end user clicks from the Email Magic Link. This should be a URL that your app receives and parses and subsequently sends an API request to authenticate the Magic Link and log in the User. If this value is not passed, the default invite redirect URL that you set in your Dashboard is used. If you have not set a default sign-up redirect URL, an error is returned. - invite_expiration_minutes: Set the expiration for the email magic link, in minutes. By default, it expires in 1 hour. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/consumer/api/otp_email.py b/stytch/consumer/api/otp_email.py index cc36b61..9d46c6c 100644 --- a/stytch/consumer/api/otp_email.py +++ b/stytch/consumer/api/otp_email.py @@ -51,7 +51,7 @@ def send( - email: The email address of the user to send the one-time passcode to. You may use sandbox@stytch.com to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -60,8 +60,8 @@ def send( - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. - session_token: The `session_token` associated with a User's existing Session. - session_jwt: The `session_jwt` associated with a User's existing Session. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -114,7 +114,7 @@ async def send_async( - email: The email address of the user to send the one-time passcode to. You may use sandbox@stytch.com to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -123,8 +123,8 @@ async def send_async( - user_id: The unique ID of a specific User. You may use an `external_id` here if one is set for the user. - session_token: The `session_token` associated with a User's existing Session. - session_jwt: The `session_jwt` associated with a User's existing Session. - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for OTP - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “OTP - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -178,14 +178,14 @@ def login_or_create( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -235,14 +235,14 @@ async def login_or_create_async( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - - login_template_id: Use a custom template for login emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Login. - - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. The template must be a template using our built-in customizations or a custom HTML email for Magic links - Sign-up. + - login_template_id: Use a custom template for login emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Login”. + - signup_template_id: Use a custom template for sign-up emails. By default, it will use your default email template. Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Magic links - Sign-up”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { diff --git a/stytch/consumer/api/otp_sms.py b/stytch/consumer/api/otp_sms.py index 1b9e535..c7653ad 100644 --- a/stytch/consumer/api/otp_sms.py +++ b/stytch/consumer/api/otp_sms.py @@ -60,7 +60,7 @@ def send( - phone_number: The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -126,7 +126,7 @@ async def send_async( - phone_number: The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -189,7 +189,7 @@ def login_or_create( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -245,7 +245,7 @@ async def login_or_create_async( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/consumer/api/otp_whatsapp.py b/stytch/consumer/api/otp_whatsapp.py index 7630cbc..1c5df6c 100644 --- a/stytch/consumer/api/otp_whatsapp.py +++ b/stytch/consumer/api/otp_whatsapp.py @@ -56,7 +56,7 @@ def send( - phone_number: The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -118,7 +118,7 @@ async def send_async( - phone_number: The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail. - expiration_minutes: Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes. - attributes: Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -177,7 +177,7 @@ def login_or_create( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. @@ -229,7 +229,7 @@ async def login_or_create_async( If false, users will be created as active. An example usage of a true flag would be to require users to verify their phone by entering the OTP code before creating an account for them. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. diff --git a/stytch/consumer/api/passwords_email.py b/stytch/consumer/api/passwords_email.py index 39903b1..7ceba77 100644 --- a/stytch/consumer/api/passwords_email.py +++ b/stytch/consumer/api/passwords_email.py @@ -42,11 +42,9 @@ def reset_start( Fields: - email: The email of the User that requested the password reset. - - reset_password_redirect_url: The url that the user clicks from the password reset email to finish the reset password flow. - This should be a url that your app receives and parses before showing your app's reset password page. - After the user submits a new password to your app, it should send an API request to complete the password reset process. - If this value is not passed, the default reset password redirect URL that you set in your Dashboard is used. - If you have not set a default reset password redirect URL, an error is returned. + - reset_password_redirect_url: The URL that the User is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - reset_password_expiration_minutes: Set the expiration for the password reset, in minutes. By default, it expires in 30 minutes. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. @@ -54,14 +52,14 @@ def reset_start( - login_redirect_url: The URL that Users are redirected to upon clicking the "Log in without password" button in password reset emails. After Users are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the User in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - reset_password_template_id: Use a custom template for password reset emails. By default, it will use your default email template. - The template must be a template using our built-in customizations or a custom HTML email for Passwords - Password reset. + Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Password reset”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -105,11 +103,9 @@ async def reset_start_async( Fields: - email: The email of the User that requested the password reset. - - reset_password_redirect_url: The url that the user clicks from the password reset email to finish the reset password flow. - This should be a url that your app receives and parses before showing your app's reset password page. - After the user submits a new password to your app, it should send an API request to complete the password reset process. - If this value is not passed, the default reset password redirect URL that you set in your Dashboard is used. - If you have not set a default reset password redirect URL, an error is returned. + - reset_password_redirect_url: The URL that the User is redirected to from the reset password magic link. This URL should display your application's reset password page. + Before rendering the reset page, extract the `token` from the query parameters. On the reset page, collect the new password and complete the flow by calling the corresponding Password Reset by Email endpoint. + If this parameter is not specified, the default Reset Password redirect URL configured in the Dashboard will be used. If you have not set a default Reset Password redirect URL, an error is returned. - reset_password_expiration_minutes: Set the expiration for the password reset, in minutes. By default, it expires in 30 minutes. The minimum expiration is 5 minutes and the maximum is 7 days (10080 mins). - code_challenge: A base64url encoded SHA256 hash of a one time secret used to validate that the request starts and ends on the same device. @@ -117,14 +113,14 @@ async def reset_start_async( - login_redirect_url: The URL that Users are redirected to upon clicking the "Log in without password" button in password reset emails. After Users are redirected to the login redirect URL, your application should retrieve the `token` value from the URL parameters and call the [Magic Link Authenticate endpoint](https://stytch.com/docs/api/authenticate-magic-link) to log the User in without requiring a password reset. If this value is not provided, your project's default login redirect URL will be used. If you have not set a default login redirect URL, an error will be returned. - - locale: Used to determine which language to use when sending the user this delivery method. Parameter is a [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. + - locale: Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. Currently supported languages are English (`"en"`), Spanish (`"es"`), French (`"fr"`) and Brazilian Portuguese (`"pt-br"`); if no value is provided, the copy defaults to English. Request support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link")! - reset_password_template_id: Use a custom template for password reset emails. By default, it will use your default email template. - The template must be a template using our built-in customizations or a custom HTML email for Passwords - Password reset. + Templates can be added in the [Stytch dashboard](https://stytch.com/dashboard/templates) using our built-in customization options or custom HTML templates with type “Passwords - Password reset”. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { diff --git a/stytch/consumer/api/sessions.py b/stytch/consumer/api/sessions.py index 0eba354..4fac01c 100644 --- a/stytch/consumer/api/sessions.py +++ b/stytch/consumer/api/sessions.py @@ -315,8 +315,6 @@ def exchange_access_token( """Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. This session can be used with the Stytch SDKs and APIs. - The Session returned will be the same Session that was active in your application (the authorizing party) during the initial authorization flow. - The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time. Fields: @@ -360,8 +358,6 @@ async def exchange_access_token_async( """Use this endpoint to exchange a Connected Apps Access Token back into a Stytch Session for the underlying User. This session can be used with the Stytch SDKs and APIs. - The Session returned will be the same Session that was active in your application (the authorizing party) during the initial authorization flow. - The Access Token must contain the `full_access` scope (only available to First Party clients) and must not be more than 5 minutes old. Access Tokens may only be exchanged a single time. Fields: diff --git a/stytch/consumer/api/webauthn.py b/stytch/consumer/api/webauthn.py index 8899fbb..6aae2ac 100644 --- a/stytch/consumer/api/webauthn.py +++ b/stytch/consumer/api/webauthn.py @@ -44,9 +44,11 @@ def register_start( To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`. - After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument. We recommend using the `create()` wrapper provided by the webauthn-json library. + After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument. - If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, the `public_key_credential_creation_options` will need to be converted to a suitable public key by unmarshalling the JSON, base64 decoding the user ID field, and converting user ID and the challenge fields into an array buffer. + When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to `true`. + + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. @@ -58,7 +60,7 @@ def register_start( - override_id: (no documentation yet) - override_name: (no documentation yet) - override_display_name: (no documentation yet) - - use_base64_url_encoding: (no documentation yet) + - use_base64_url_encoding: If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -102,9 +104,11 @@ async def register_start_async( To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`. - After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument. We recommend using the `create()` wrapper provided by the webauthn-json library. + After calling this endpoint, the browser will need to call [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) with the data from [public_key_credential_creation_options](https://w3c.github.io/webauthn/#dictionary-makecredentialoptions) passed to the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request via the public key argument. + + When using built-in browser methods like `navigator.credentials.create()`, set the `use_base64_url_encoding` option to `true`. - If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, the `public_key_credential_creation_options` will need to be converted to a suitable public key by unmarshalling the JSON, base64 decoding the user ID field, and converting user ID and the challenge fields into an array buffer. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. @@ -116,7 +120,7 @@ async def register_start_async( - override_id: (no documentation yet) - override_name: (no documentation yet) - override_display_name: (no documentation yet) - - use_base64_url_encoding: (no documentation yet) + - use_base64_url_encoding: If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -156,7 +160,7 @@ def register( ) -> RegisterResponse: """Complete the creation of a WebAuthn registration by passing the response from the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as the `public_key_credential` parameter. - If the [webauthn-json](https://github.com/github/webauthn-json) library's `create()` method was used, the response can be passed directly to the [register endpoint](https://stytch.com/docs/api/webauthn-register). If not, some fields (the client data and the attestation object) from the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) response will need to be converted from array buffers to strings and marshalled into JSON. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. @@ -209,7 +213,7 @@ async def register_async( ) -> RegisterResponse: """Complete the creation of a WebAuthn registration by passing the response from the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) request to this endpoint as the `public_key_credential` parameter. - If the [webauthn-json](https://github.com/github/webauthn-json) library's `create()` method was used, the response can be passed directly to the [register endpoint](https://stytch.com/docs/api/webauthn-register). If not, some fields (the client data and the attestation object) from the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential) response will need to be converted from array buffers to strings and marshalled into JSON. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. @@ -261,16 +265,18 @@ def authenticate_start( To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`. - After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. We recommend using the `get()` wrapper provided by the webauthn-json library. + After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. - If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, `the public_key_credential_request_options` will need to be converted to a suitable public key by unmarshalling the JSON and converting some the fields to array buffers. + When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to `true`. + + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - domain: The domain for Passkeys or WebAuthn. Defaults to `window.location.hostname`. - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. - return_passkey_credential_options: If true, the `public_key_credential_creation_options` returned will be optimized for Passkeys with `userVerification` set to `"preferred"`. - - use_base64_url_encoding: (no documentation yet) + - use_base64_url_encoding: If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -300,16 +306,18 @@ async def authenticate_start_async( To optimize for Passkeys, set the `return_passkey_credential_options` field to `true`. - After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. We recommend using the `get()` wrapper provided by the webauthn-json library. + After calling this endpoint, the browser will need to call [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) with the data from `public_key_credential_request_options` passed to the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request via the public key argument. + + When using built-in browser methods like `navigator.credentials.get()`, set the `use_base64_url_encoding` option to `true`. - If you are not using the [webauthn-json](https://github.com/github/webauthn-json) library, `the public_key_credential_request_options` will need to be converted to a suitable public key by unmarshalling the JSON and converting some the fields to array buffers. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - domain: The domain for Passkeys or WebAuthn. Defaults to `window.location.hostname`. - user_id: The `user_id` of an active user the Passkey or WebAuthn registration should be tied to. You may use an `external_id` here if one is set for the user. - return_passkey_credential_options: If true, the `public_key_credential_creation_options` returned will be optimized for Passkeys with `userVerification` set to `"preferred"`. - - use_base64_url_encoding: (no documentation yet) + - use_base64_url_encoding: If true, values in the `public_key_credential_creation_options` will be base64 URL encoded. Set this option to true when using built-in browser methods like `navigator.credentials.create` and `navigator.credentials.get`. """ # noqa headers: Dict[str, str] = {} data: Dict[str, Any] = { @@ -339,7 +347,7 @@ def authenticate( ) -> AuthenticateResponse: """Complete the authentication of a Passkey or WebAuthn registration by passing the response from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate endpoint. - If the [webauthn-json](https://github.com/github/webauthn-json) library's `get()` method was used, the response can be passed directly to the [authenticate endpoint](https://stytch.com/docs/api/webauthn-authenticate). If not some fields from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) response will need to be converted from array buffers to strings and marshalled into JSON. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - public_key_credential: The response of the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential). @@ -389,7 +397,7 @@ async def authenticate_async( ) -> AuthenticateResponse: """Complete the authentication of a Passkey or WebAuthn registration by passing the response from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) request to the authenticate endpoint. - If the [webauthn-json](https://github.com/github/webauthn-json) library's `get()` method was used, the response can be passed directly to the [authenticate endpoint](https://stytch.com/docs/api/webauthn-authenticate). If not some fields from the [navigator.credentials.get()](https://www.w3.org/TR/webauthn-2/#sctn-getAssertion) response will need to be converted from array buffers to strings and marshalled into JSON. + See our [WebAuthn setup guide](https://stytch.com/docs/guides/webauthn/api) for additional usage instructions and example code. Fields: - public_key_credential: The response of the [navigator.credentials.create()](https://www.w3.org/TR/webauthn-2/#sctn-createCredential). diff --git a/stytch/consumer/client.py b/stytch/consumer/client.py index 66fca38..fa3b156 100644 --- a/stytch/consumer/client.py +++ b/stytch/consumer/client.py @@ -45,8 +45,8 @@ def __init__( secret: str, environment: Optional[str] = None, suppress_warnings: bool = False, - async_session: Optional[aiohttp.ClientSession] = None, sync_session: Optional[requests.Session] = None, + async_session: Optional[aiohttp.ClientSession] = None, fraud_environment: Optional[str] = None, custom_base_url: Optional[str] = None, ): @@ -55,8 +55,8 @@ def __init__( secret=secret, environment=environment, suppress_warnings=suppress_warnings, - async_session=async_session, sync_session=sync_session, + async_session=async_session, fraud_environment=fraud_environment, custom_base_url=custom_base_url, ) diff --git a/stytch/consumer/models/passwords.py b/stytch/consumer/models/passwords.py index 6900ef6..3908682 100644 --- a/stytch/consumer/models/passwords.py +++ b/stytch/consumer/models/passwords.py @@ -208,11 +208,11 @@ class MigrateResponse(ResponseBase): class StrengthCheckResponse(ResponseBase): """Response type for `Passwords.strength_check`. Fields: - - valid_password: Returns `true` if the password passes our password validation. We offer two validation options, [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy). If an email address is included in the call we also require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/). + - valid_password: Returns `true` if the password passes our password validation. We offer two validation options, [zxcvbn](https://stytch.com/docs/guides/passwords/strength-policy) is the default option which offers a high level of sophistication. We also offer [LUDS](https://stytch.com/docs/guides/passwords/strength-policy) which is less sophisticated but easier to understand. If an email address is included in the call we also require that the password hasn't been compromised using built-in breach detection powered by [HaveIBeenPwned](https://haveibeenpwned.com/). - score: The score of the password determined by [zxcvbn](https://github.com/dropbox/zxcvbn). Values will be between 1 and 4, a 3 or greater is required to pass validation. - breached_password: Returns `true` if the password has been breached. Powered by [HaveIBeenPwned](https://haveibeenpwned.com/). - strength_policy: The strength policy type enforced, either `zxcvbn` or `luds`. - - breach_detection_on_create: Will return `true` if breach detection will be evaluated. By default this option is enabled. This option can be disabled by contacting [support@stytch.com](mailto:support@stytch.com?subject=Password%20strength%20configuration). If this value is `false` then `breached_password` will always be `false` as well. + - breach_detection_on_create: Will return `true` if breach detection will be evaluated. By default this option is enabled. This option can be disabled in the [dashboard](https://stytch.com/dashboard/password-strength-config#breach-detection). If this value is `false` then `breached_password` will always be `false` as well. - feedback: Feedback for how to improve the password's strength [HaveIBeenPwned](https://haveibeenpwned.com/). """ # noqa diff --git a/stytch/consumer/models/rbac.py b/stytch/consumer/models/rbac.py index ceee362..e968676 100644 --- a/stytch/consumer/models/rbac.py +++ b/stytch/consumer/models/rbac.py @@ -61,11 +61,27 @@ class PolicyRole(pydantic.BaseModel): class PolicyScopePermission(pydantic.BaseModel): + """ + Fields: + - resource_id: A unique identifier of the RBAC Resource, provided by the developer and intended to be human-readable. + + A `resource_id` is not allowed to start with `stytch`, which is a special prefix used for Stytch default Resources with reserved `resource_id`s. + + - actions: A list of permitted actions the Scope is required to take with the provided Resource. You can use `*` as a wildcard to require a Scope permission to use all possible actions related to the Resource. + """ # noqa + resource_id: str actions: List[str] class PolicyScope(pydantic.BaseModel): + """ + Fields: + - scope: The unique identifier of the RBAC Scope, provided by the developer and intended to be human-readable. + - description: The description of the RBAC Scope. + - permissions: A list of permissions that link a [Resource](https://stytch.com/docs/api/rbac-resource-object) to a list of actions. + """ # noqa + scope: str description: str permissions: List[PolicyScopePermission] @@ -76,7 +92,7 @@ class Policy(pydantic.BaseModel): Fields: - roles: An array of [Role objects](https://stytch.com/docs/api/rbac-role-object). - resources: An array of [Resource objects](https://stytch.com/docs/api/rbac-resource-object). - - scopes: (no documentation yet) + - scopes: An array of [Scope objects](https://stytch.com/docs/api/rbac-scope-object). """ # noqa roles: List[PolicyRole] diff --git a/stytch/consumer/models/users.py b/stytch/consumer/models/users.py index 121ea0e..b4efacc 100644 --- a/stytch/consumer/models/users.py +++ b/stytch/consumer/models/users.py @@ -200,7 +200,7 @@ class User(pydantic.BaseModel): - totps: An array containing a list of all TOTP instances for a given User in the Stytch API. - crypto_wallets: An array contains a list of all crypto wallets for a given User in the Stytch API. - biometric_registrations: An array that contains a list of all biometric registrations for a given User in the Stytch API. - - is_locked: (no documentation yet) + - is_locked: Whether the User is temporarily locked due to too many failed authentication attempts. See the [User Locking Guide](https://stytch.com/docs/resources/platform/user-locks) for more information. - roles: Roles assigned to this User. See the [RBAC guide](https://stytch.com/docs/guides/rbac/role-assignment) for more information about role assignment. - name: The name of the User. Each field in the `name` object is optional. @@ -208,9 +208,9 @@ class User(pydantic.BaseModel): - password: The password object is returned for users with a password. - trusted_metadata: The `trusted_metadata` field contains an arbitrary JSON object of application-specific data. See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details. - untrusted_metadata: The `untrusted_metadata` field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and **cannot be used to store critical information.** See the [Metadata](https://stytch.com/docs/api/metadata) reference for complete field behavior details. - - external_id: (no documentation yet) - - lock_created_at: (no documentation yet) - - lock_expires_at: (no documentation yet) + - external_id: An identifier that can be used in most API calls where a `member_id` is expected. This is a string consisting of alphanumeric, `.`, `_`, `-`, or `|` characters with a maximum length of 128 characters. External IDs must be unique within the project. + - lock_created_at: When the user lock was created, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. + - lock_expires_at: When the user lock expires, if there is one. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. `2021-12-29T12:33:09Z`. """ # noqa user_id: str diff --git a/stytch/version.py b/stytch/version.py index 15fd90e..d5793af 100644 --- a/stytch/version.py +++ b/stytch/version.py @@ -1 +1 @@ -__version__ = "14.4.0" +__version__ = "15.0.0"