function useAddOauthProvider(mutationArgs?): UseAddOauthProviderResult;Defined in: account-kit/react/dist/types/hooks/useAddOauthProvider.d.ts:36
A custom hook to handle adding an OAuth provider to an already authenticated account, which includes executing a mutation with optional parameters.
import { useAddOauthProvider } from "@account-kit/react";
const { addOauthProvider, isAddingOauthProvider, error } = useAddOauthProvider({
// these are optional
onSuccess: () => {
// do something on success
},
onError: (error) => console.error(error),
});| Parameter | Type | Description |
|---|---|---|
|
| Optional arguments for the mutation used for adding an OAuth provider. |
An object containing the addOauthProvider function, addOauthProviderAsync for async execution, a boolean isAddingOauthProvider to track the mutation status, and any error encountered.