useUnlinkProfile

Unlinks a web2 or web3 profile currently connected in-app or ecosystem account. When a profile is unlinked from the account, it will no longer be able to be used to sign into the account.

Example

Unlinking an email account

import { useUnlinkProfile } from "thirdweb/react";
const { data: connectedProfiles, isLoading } = useProfiles({
client: props.client,
});
const { mutate: unlinkProfile } = useUnlinkProfile();
const onClick = () => {
unlinkProfile({
client,
// Select any other profile you want to unlink
profileToUnlink: connectedProfiles[1],
});
};
function useUnlinkProfile(): UseMutationResult<
void,
Error,
{ client: ThirdwebClient; profileToUnlink: Profile },
unknown
>;

Returns

let returnType: UseMutationResult<
void,
Error,
{ client: ThirdwebClient; profileToUnlink: Profile },
unknown
>;