- The secondary account is removed from the identities array of the primary account.
- A new secondary user account is created.
- The secondary account will have no metadata.
update:current_user_identities
from client-side codeupdate:users
from server-side code
Parameter | Type | Description |
---|---|---|
id | string | ID of the primary user account (required) |
provider | string | identity provider name of the secondary linked account (e.g. google-oauth2 ) |
user_id | string | ID of the secondary linked account (e.g. 123456789081523216417 part after the ` |
[connection_name]|
before the user_id
stringto name the provider (for example, "user-id": "google-oauth2|123456789081523216417").
Response example
Use JWT from the primary account
To unlink accounts, call the Management API Unlink a User Account endpoint using the from the primary account for authorization:Use Access Token with the update:users scope
If you need to unlink two or more user accounts, call the Management API Unlink a User Account endpoint using an Management API Access Token with theupdate:users
scope.
Unlink accounts from server-side code
- Update the user in session with the new array of identities (each of which represent a separate user account).
- Call the Management API v2 Unlink a User Account endpoint using an Management API Access Token with the
update:users
scope.