> ## Documentation Index
> Fetch the complete documentation index at: https://docs.privy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoking signers

> Allow users to revoke signer consent and prevent further server-side wallet actions

Once a user has [provisioned a signer](/wallets/using-wallets/signers/delegate-wallet), they may also revoke consent to prevent your app from taking any further wallet actions on their behalf.

<View title="React" icon="react">
  To revoke all signers on users wallets automatically, *without* a revocation screen, use the `revokeWallets` method from the `useHeadlessDelegatedActions` hook:

  ```tsx theme={"system"}
  type revokeWallets: async () => Promise<void>
  ```

  ### Usage

  ```tsx theme={"system"}
  import {useHeadlessDelegatedActions} from '@privy-io/react-auth';
  ...
  const {revokeWallets} = useHeadlessDelegatedActions();
  ```

  When invoked, the `revokeWallets` method will revoke all of the signers provisioned on all of the user's wallets

  Once a user confirms revocation, your app will no longer be able to take actions on behalf of the user with their wallet unless the user [provisions a signer](/wallets/using-wallets/signers/delegate-wallet).

  If a user has provisioned multiple signers, they will **all** be revoked.

  As an example, you might have a button within your app to allow users to revoke signer provisioned wallets like so:

  ```tsx Example Create Wallet Button theme={"system"}
  import {usePrivy, useheadlessDelegatedActions, type WalletWithMetadata} from '@privy-io/react-auth';

  function RevokeDelegateActionButton() {
    const {user} = usePrivy();
    const {revokeWallets} = useHeadlessDelegatedActions();

    // Check if the user has any delegated wallets by searching the linkedAccounts array for wallets
    // with `delegated: true` set
    const hasDelegatedWallets =
      user.linkedAccounts.filter(
        (account): account is WalletWithMetadata => account.type === 'wallet' && account.delegated
      ).length !== 0;

    const onRevoke = async () => {
      if (!hasDelegatedWallets) return; // Button is disabled to prevent this case
      await revokeWallets();
    };

    return (
      <button disabled={!hasDelegatedWallets} onClick={onRevoke}>
        Revoke permission for this app to transact on my behalf
      </button>
    );
  }
  ```
</View>

<View title="React Native" icon="react">
  To revoke all signers on users wallets automatically, *without* a revocation screen, use the `revokeWallets` method from the `useHeadlessDelegatedActions` hook:

  ```tsx theme={"system"}
  type revokeWallets: async () => Promise<void>
  ```

  ### Usage

  ```tsx theme={"system"}
  import {useHeadlessDelegatedActions} from '@privy-io/expo';
  ...
  const {revokeWallets} = useHeadlessDelegatedActions();
  ```

  When invoked, the `revokeWallets` method will revoke all of the signers on user's wallets.

  Once a user confirms revocation, your app will no longer be able to take actions on behalf of the user with their wallet unless the user [provisions a signer](/wallets/using-wallets/signers/delegate-wallet).

  If a user has provisioned multiple signers, they will **all** be revoked.

  As an example, you might have a button within your app to allow users to revoke all signers on a user's wallets like so:

  ```tsx Example Create Wallet Button theme={"system"}
  import {usePrivy, useHeadlessDelegatedActions, type WalletWithMetadata} from '@privy-io/expo';

  function RevokeDelegateActionButton() {
    const {user} = usePrivy();
    const {revokeWallets} = useHeadlessDelegatedActions();
    const wallets = getAllUserEmbeddedEthereumWallets(user); // or getAllUserEmbeddedSolanaWallets

    // Check if the user has any delegated wallets by searching the user's wallets for any with
    // `delegated: true` set.
    const hasDelegatedWallets = wallets.some((wallet) => wallet.delegated);

    const onRevoke = async () => {
      if (!hasDelegatedWallets) return; // Button is disabled to prevent this case
      await revokeWallets();
    };

    return (
      <button disabled={!hasDelegatedWallets} onClick={onRevoke}>
        Revoke permission for this app to transact on my behalf
      </button>
    );
  }
  ```
</View>
