# useAuthModal | @account-kit/react

> Overview of the useAuthModal 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 useAuthModal(): object;
```

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

A [hook](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts) that returns the open and close functions for the Auth Modal if uiConfig
is enabled on the Account Provider

## Example

```tsx twoslash
import React from "react";
import { useAuthModal } from "@account-kit/react";

const ComponentWithAuthModal = () => {
  const { openAuthModal } = useAuthModal();

  return (
    <div>
      <button onClick={openAuthModal}>Login</button>
    </div>
  );
};
```

## Returns

`object`

an object containing methods for opening or closing the auth modal. [ref](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/react/src/hooks/useAuthModal.ts#L4)

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

  <tbody>
    <tr>
      <td>
        `closeAuthModal()`
      </td>

      <td>
        () => `void`
      </td>
    </tr>

    <tr>
      <td>
        `isOpen`
      </td>

      <td>
        `boolean`
      </td>
    </tr>

    <tr>
      <td>
        `openAuthModal()`
      </td>

      <td>
        () => `void`
      </td>
    </tr>

  </tbody>
</table>