The React SDK supports unlinking all supported account types via dedicated hooks.
To prompt a user to unlink an account, use the corresponding hook:Below is an example button for prompting a user to unlink certain linked accounts:
Each hook returns an
unlink method that accepts an object with the relevant identifier.Users are only permitted to unlink an account so long as they have at least one more linked account.
Unlinking OAuth accounts
TheuseUnlinkOAuth hook supports unlinking any OAuth provider, including built-in providers (e.g., 'google', 'twitter') and additional OAuth providers (e.g., 'custom:twitch').Parameters
Theunlink method from useUnlinkOAuth accepts an object with the following fields:string
required
The OAuth provider to unlink. Use a built-in provider (e.g.,
'google', 'twitter') or a custom provider in the format 'custom:<provider-name>' (e.g., 'custom:twitch').string
required
The provider-specific subject identifier that uniquely identifies the user for the selected OAuth provider. This can be found in the linked account’s
subject field.
