Alchemy Logo

useRemoveOauthProvider

function useRemoveOauthProvider(mutationArgs?): UseRemoveOauthProviderResult;

Defined in: account-kit/react/src/hooks/useRemoveOauthProvider.ts:52

A custom hook to handle removing an OAuth provider from an already authenticated account, which includes executing a mutation with optional parameters.

import { useRemoveOauthProvider } from "@account-kit/react";
 
const { removeOauthProvider, isRemovingOauthProvider, error } =
  useRemoveOauthProvider({
    // these are optional
    onSuccess: () => {
      // do something on success
    },
    onError: (error) => console.error(error),
  });

ParameterTypeDescription

mutationArgs?

Partial<Omit<UseMutationOptions<void, Error, string, unknown>, "mutationFn" | "mutationKey">>

Optional arguments for the mutation used for removing an OAuth provider.

UseRemoveOauthProviderResult

An object containing the removeOauthProvider function, removeOauthProviderAsync for async execution, a boolean isRemovingOauthProvider to track the mutation status, and any error encountered.

Was this page helpful?