# `useSignOut`

Signs out users and clears authentication state.

## Usage

```tsx
import { useSignOut } from '@openfort/react-native';

function LogoutButton() {
  const { signOut, isLoading, isError, error } = useSignOut({
    onSuccess: () => console.log('Successfully signed out'),
    onError: (error) => console.error('Sign out failed:', error?.message),
  });

  return <Button title="Sign out" onPress={() => signOut()} disabled={isLoading} />;
}
```

## Hook options

Pass these options when initializing the hook:

```ts
type SignOutHookOptions = {
  onSuccess?: (data: {}) => void
  onError?: (error: OpenfortError) => void
  throwOnError?: boolean
}
```

## Return type

The hook returns the following:

```ts
type SignOutReturn = {
  signOut(options?: SignOutHookOptions): Promise<{} | { error: OpenfortError }>
  isLoading: boolean
  isError: boolean
  isSuccess: boolean
  error: OpenfortError | null
}
```
