Skip to content

Commit befdd99

Browse files
authored
feat!: phone provider protection, FedCM & native social login config (breaking: user date fields, clients.update login types) (#868)
## Changes ### ⚠️ Breaking Changes - **`clients.update()` social/FedCM request types changed** — `native_social_login` and `fedcm_login` on `clients.update()` (`PATCH /api/v2/clients/{id}`) changed from `NativeSocialLogin` / `FedCmLogin` to `NativeSocialLoginPatch` / `FedCmLoginPatch`. `clients.create()` still uses the non-patch types, so create and update now require different types for the same logical field. Code passing the old types to `update()` must switch to the `*Patch` variants. - **`UserDateSchema` removed — user date fields now `datetime`** — the `UserDateSchema` type (`Union[str, Dict[str, Any]]`) is deleted and no longer exported from `auth0.management.types`. `created_at`, `updated_at`, `last_login`, `last_password_reset`, and `multifactor_last_modified` on `GetUserResponseContent`, `CreateUserResponseContent`, `UpdateUserResponseContent`, and `UserResponseSchema` are now `Optional[datetime.datetime]`. Code that read these as strings/dicts must update. ### Type Changes - **Clients — FedCM / Google One Tap** — new `fedcm_login` (read: `FedCmLogin`/`FedCmLoginGoogle`; write: `FedCmLoginPatch`/`FedCmLoginGooglePatch`) on create/update/response, gating the Google One Tap prompt in New Universal Login via `fedcm_login.google.is_enabled`. - **Clients — Native Social Login patch types** — new `NativeSocialLoginPatch` wrapping `apple`/`facebook`/`google` patch variants (each `enabled: Optional[bool]`) for `clients.update()`. - **Clients — Token Vault Privileged Access** — new `token_vault_privileged_access` field on create/update/response, typed `ClientTokenVaultPrivilegedAccessWithPublicKey` (create) and `ClientTokenVaultPrivilegedAccessWithCredentialId` (update), each with `credentials` + `ip_allowlist`. - **Connections — Cross App Access** — new `cross_app_access_requesting_app` field (`CrossAppAccessRequestingApp{active: bool}`) on `connections.create()`/`update()`, OIDC/Okta request types, and all connection response types. - **Identity `user_id` widened to `Union[str, int]`** — on `UserIdentitySchema`, `UserIdentity`, and `DeleteUserIdentityResponseContentItem`, fixing Pydantic errors on numeric (e.g. GitHub) identity IDs. - **Email templates** — new `auth_email_by_code` value in `EmailTemplateNameEnum`. - **Attack Protection — Phone Provider Protection** — new `attack_protection.phone_provider_protection` sub-client with `get()` / `patch(type=...)` (`GET`/`PATCH /attack-protection/phone-provider-protection`); new `PhoneProviderProtectionBackoffStrategyEnum` (`exponential`/`none`) and response types. ### Bug Fixes - **404 handling added across multiple raw clients** — `keys.signing`, `organizations` (connections, enabled connections, members, member roles), `roles.permissions`, `self_service_profiles.sso_ticket`, `user_attribute_profiles`, and `users` (connected accounts, organizations, permissions, roles) now raise a typed `NotFoundError` on 404 instead of an unhandled parse error.
2 parents 34f8183 + 9521100 commit befdd99

67 files changed

Lines changed: 1996 additions & 102 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

reference.md

Lines changed: 176 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,14 @@ client.clients.create(
19661966
<dl>
19671967
<dd>
19681968

1969+
**token_vault_privileged_access:** `typing.Optional[ClientTokenVaultPrivilegedAccessWithPublicKey]`
1970+
1971+
</dd>
1972+
</dl>
1973+
1974+
<dl>
1975+
<dd>
1976+
19691977
**compliance_level:** `typing.Optional[ClientComplianceLevelEnum]`
19701978

19711979
</dd>
@@ -2758,15 +2766,15 @@ client.clients.update(
27582766
<dl>
27592767
<dd>
27602768

2761-
**native_social_login:** `typing.Optional[NativeSocialLogin]`
2769+
**native_social_login:** `typing.Optional[NativeSocialLoginPatch]`
27622770

27632771
</dd>
27642772
</dl>
27652773

27662774
<dl>
27672775
<dd>
27682776

2769-
**fedcm_login:** `typing.Optional[FedCmLogin]`
2777+
**fedcm_login:** `typing.Optional[FedCmLoginPatch]`
27702778

27712779
</dd>
27722780
</dl>
@@ -2846,6 +2854,14 @@ client.clients.update(
28462854
<dl>
28472855
<dd>
28482856

2857+
**token_vault_privileged_access:** `typing.Optional[ClientTokenVaultPrivilegedAccessWithCredentialId]`
2858+
2859+
</dd>
2860+
</dl>
2861+
2862+
<dl>
2863+
<dd>
2864+
28492865
**compliance_level:** `typing.Optional[ClientComplianceLevelEnum]`
28502866

28512867
</dd>
@@ -3891,6 +3907,14 @@ client.connections.create(
38913907
<dl>
38923908
<dd>
38933909

3910+
**cross_app_access_requesting_app:** `typing.Optional[CrossAppAccessRequestingApp]`
3911+
3912+
</dd>
3913+
</dl>
3914+
3915+
<dl>
3916+
<dd>
3917+
38943918
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
38953919

38963920
</dd>
@@ -4204,6 +4228,14 @@ client.connections.update(
42044228
<dl>
42054229
<dd>
42064230

4231+
**cross_app_access_requesting_app:** `typing.Optional[CrossAppAccessRequestingApp]`
4232+
4233+
</dd>
4234+
</dl>
4235+
4236+
<dl>
4237+
<dd>
4238+
42074239
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
42084240

42094241
</dd>
@@ -5565,7 +5597,7 @@ client.email_templates.create(
55655597
<dl>
55665598
<dd>
55675599

5568-
Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, and `async_approval`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
5600+
Retrieve an email template by pre-defined name. These names are `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, and `async_approval`. The names `change_password`, and `password_reset` are also supported for legacy scenarios.
55695601
</dd>
55705602
</dl>
55715603
</dd>
@@ -5606,7 +5638,7 @@ client.email_templates.get(
56065638
<dl>
56075639
<dd>
56085640

5609-
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
5641+
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
56105642

56115643
</dd>
56125644
</dl>
@@ -5680,7 +5712,7 @@ client.email_templates.set(
56805712
<dl>
56815713
<dd>
56825714

5683-
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
5715+
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
56845716

56855717
</dd>
56865718
</dl>
@@ -5825,7 +5857,7 @@ client.email_templates.update(
58255857
<dl>
58265858
<dd>
58275859

5828-
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
5860+
**template_name:** `EmailTemplateNameEnum` — Template name. Can be `verify_email`, `verify_email_by_code`, `auth_email_by_code`, `reset_email`, `reset_email_by_code`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, `mfa_oob_code`, `user_invitation`, `async_approval`, `change_password` (legacy), or `password_reset` (legacy).
58295861

58305862
</dd>
58315863
</dl>
@@ -19420,6 +19452,143 @@ client.attack_protection.captcha.update()
1942019452
</dl>
1942119453

1942219454

19455+
</dd>
19456+
</dl>
19457+
</details>
19458+
19459+
## AttackProtection PhoneProviderProtection
19460+
<details><summary><code>client.attack_protection.phone_provider_protection.<a href="src/auth0.management/attack_protection/phone_provider_protection/client.py">get</a>() -> GetPhoneProviderProtectionResponseContent</code></summary>
19461+
<dl>
19462+
<dd>
19463+
19464+
#### 📝 Description
19465+
19466+
<dl>
19467+
<dd>
19468+
19469+
<dl>
19470+
<dd>
19471+
19472+
Get the phone provider protection configuration for a tenant.
19473+
</dd>
19474+
</dl>
19475+
</dd>
19476+
</dl>
19477+
19478+
#### 🔌 Usage
19479+
19480+
<dl>
19481+
<dd>
19482+
19483+
<dl>
19484+
<dd>
19485+
19486+
```python
19487+
from auth0.management import Auth0
19488+
from auth0.management.environment import Auth0Environment
19489+
19490+
client = Auth0(
19491+
token="<token>",
19492+
environment=Auth0Environment.DEFAULT,
19493+
)
19494+
19495+
client.attack_protection.phone_provider_protection.get()
19496+
19497+
```
19498+
</dd>
19499+
</dl>
19500+
</dd>
19501+
</dl>
19502+
19503+
#### ⚙️ Parameters
19504+
19505+
<dl>
19506+
<dd>
19507+
19508+
<dl>
19509+
<dd>
19510+
19511+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
19512+
19513+
</dd>
19514+
</dl>
19515+
</dd>
19516+
</dl>
19517+
19518+
19519+
</dd>
19520+
</dl>
19521+
</details>
19522+
19523+
<details><summary><code>client.attack_protection.phone_provider_protection.<a href="src/auth0.management/attack_protection/phone_provider_protection/client.py">patch</a>(...) -> PatchPhoneProviderProtectionResponseContent</code></summary>
19524+
<dl>
19525+
<dd>
19526+
19527+
#### 📝 Description
19528+
19529+
<dl>
19530+
<dd>
19531+
19532+
<dl>
19533+
<dd>
19534+
19535+
Update the phone provider protection configuration for a tenant.
19536+
</dd>
19537+
</dl>
19538+
</dd>
19539+
</dl>
19540+
19541+
#### 🔌 Usage
19542+
19543+
<dl>
19544+
<dd>
19545+
19546+
<dl>
19547+
<dd>
19548+
19549+
```python
19550+
from auth0.management import Auth0
19551+
from auth0.management.environment import Auth0Environment
19552+
19553+
client = Auth0(
19554+
token="<token>",
19555+
environment=Auth0Environment.DEFAULT,
19556+
)
19557+
19558+
client.attack_protection.phone_provider_protection.patch(
19559+
type="exponential",
19560+
)
19561+
19562+
```
19563+
</dd>
19564+
</dl>
19565+
</dd>
19566+
</dl>
19567+
19568+
#### ⚙️ Parameters
19569+
19570+
<dl>
19571+
<dd>
19572+
19573+
<dl>
19574+
<dd>
19575+
19576+
**type:** `PhoneProviderProtectionBackoffStrategyEnum`
19577+
19578+
</dd>
19579+
</dl>
19580+
19581+
<dl>
19582+
<dd>
19583+
19584+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
19585+
19586+
</dd>
19587+
</dl>
19588+
</dd>
19589+
</dl>
19590+
19591+
1942319592
</dd>
1942419593
</dl>
1942519594
</details>
@@ -37633,7 +37802,7 @@ client.users.identities.link(
3763337802
<dl>
3763437803
<dd>
3763537804

37636-
**user_id:** `typing.Optional[UserId]`
37805+
**user_id:** `typing.Optional[UserId]` — user_id of the secondary user account being linked.
3763737806

3763837807
</dd>
3763937808
</dl>

0 commit comments

Comments
 (0)