# Disconnect Wallet

Let users disconnect their wallet from your app when desired. The Disconnect Wallet flow:

* Ends the wallet session and clears user state
* Handles cleanup for both embedded and external wallets
* Can trigger UI transitions to onboarding or profile screens

## Use `useSignOut`

Disconnect uses [`useSignOut`](/docs/products/embedded-wallet/react/hooks/useSignOut) from `@openfort/react`. It clears authentication state and disconnects from all services.

```tsx
import { useSignOut } from "@openfort/react"

function DisconnectButton() {
  const { signOut, isLoading } = useSignOut({
    onSuccess: () => {
      // Redirect to login or home
      window.location.href = "/"
    },
  })

  return (
    <button onClick={() => signOut()} disabled={isLoading}>
      {isLoading ? "Disconnecting..." : "Disconnect"}
    </button>
  )
}
```

`useSignOut` returns `{ signOut, isLoading, isError, isSuccess, error }`. Call `signOut()` to end the session. For external wallets connected via the wagmi bridge, signing out also clears the wagmi connection.
