> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-docs-simplify-quickstart-2510244c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Shared Session Auth

> Share user sessions between your dashboard and docs

Shared Session Authentication lets you use existing session data from your user's browser to authenticate your documentation.

## Setup

<Steps>
  <Step title="Create User Info API">
    Create an API endpoint that:

    * Uses your existing session authentication
    * Returns user data in the [UserInfo](./sending-data) format
    * Includes proper CORS headers if your API and docs domains differ:
      ```text
      Access-Control-Allow-Origin: your-docs-domain.com
      Access-Control-Allow-Credentials: true
      ```

    <Warning>
      Only enable these CORS settings on your user info endpoint, not across all API routes.
    </Warning>
  </Step>

  <Step title="Configure Settings">
    Add your API URL and Login URL in your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication).
  </Step>
</Steps>

## Example Setup

Your setup will depend on where your dashboard and docs are hosted:

* **Different Subdomains**: For dashboard at `dash.example.com` and docs at `docs.example.com`
  ```text
  API Endpoint: https://dash.example.com/api/docs/user-info
  CORS Origin: https://docs.example.com
  ```

* **Dashboard Subdomain, Docs at Root**: For dashboard at `dash.example.com` and docs at `example.com/docs`
  ```text
  API Endpoint: https://dash.example.com/api/docs/user-info
  CORS Origin: https://example.com
  ```

* **Same Domain**: For dashboard at `example.com/dashboard` and docs at `example.com/docs`
  ```text
  API Endpoint: https://example.com/api/docs/user-info
  ```
