> For the complete documentation index, see [llms.txt](https://just-auth.gitbook.io/just-auth-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://just-auth.gitbook.io/just-auth-docs/integration/auth_modal.md).

# Opening the Auth Modal

## Overview

The `openAuthModal` function allows users to sign up or log in.

## How to Use

1. **Destructure the function from the hook:**

   ```typescript
   const { openAuthModal } = useJustAuth();
   ```
2. **Call the function on a button click:**

   ```typescript
   <button onClick={openAuthModal}>Login / Sign Up</button>
   ```

## Parameters

* No parameters are required for this function.

## Example

```typescript
const { openAuthModal } = useJustAuth();

<button onClick={openAuthModal}>Login / Sign Up</button>
```
