# useRemovePasskey | @account-kit/react

> Overview of the useRemovePasskey hook from @account-kit/react

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function useRemovePasskey(mutationArgs?): UseRemovePasskeyResult;
```

Defined in: [account-kit/react/src/hooks/useRemovePasskey.ts:42](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L42)

A custom [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAddPasskey.ts) to handle the addition of a passkey to an already authenticated account, which includes executing a mutation with optional parameters.

## Example

```ts twoslash
import { useRemovePasskey } from "@account-kit/react";

const { removePasskey, isRemovingPasskey, error } = useRemovePasskey({
  // these are optional
  onSuccess: () => {
    // do something on success
  },
  onError: (error) => console.error(error),
});
```

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `mutationArgs?`
      </td>

      <td>
        `Partial`\<`Omit`\<`UseMutationOptions`\<`void`, `Error`, `string`, `unknown`>, `"mutationFn"` | `"mutationKey"`>>
      </td>

      <td>
        Optional arguments for the mutation used for removing a passkey. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L8)
      </td>
    </tr>

  </tbody>
</table>

## Returns

[`UseRemovePasskeyResult`](../type-aliases/UseRemovePasskeyResult)

An object containing the `removePasskey` function, `removePasskeyAsync` for async execution, a boolean `isRemovingPasskey` to track the mutation status, and any error encountered. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useRemovePasskey.ts#L13)