> ## Documentation Index
> Fetch the complete documentation index at: https://sourcebot-whoisthey-language-model-input-modalities.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

<Warning>If you're deploying Sourcebot behind a domain, you must set the [AUTH\_URL](/docs/configuration/environment-variables) environment variable.</Warning>

Sourcebot's built-in authentication system gates your deployment, and allows administrators to manage users and their permissions.

<CardGroup cols={2}>
  <Card horizontal title="Authentication providers" icon="lock" href="/docs/configuration/auth/providers">
    Configure additional authentication providers for your deployment.
  </Card>

  <Card horizontal title="Access settings" icon="user" href="/docs/configuration/auth/access-settings">
    Learn how to configure how members join your deployment.
  </Card>

  <Card horizontal title="Roles and permissions" icon="shield" href="/docs/configuration/auth/roles-and-permissions">
    Learn more about the different roles and permissions in Sourcebot.
  </Card>

  <Card horizontal title="FAQ" icon="question" href="/docs/configuration/auth/faq">
    Have a question about Sourcebot's auth system? We might have the answers here.
  </Card>
</CardGroup>

# Session lifetime

By default, session cookies remain valid for 30 days from the time they are issued, after which the user is signed out and must authenticate again.

You can change this by setting the [`AUTH_SESSION_MAX_AGE_SECONDS`](/docs/configuration/environment-variables) environment variable to the desired lifetime in seconds.

A session is guaranteed to remain valid for at least its configured lifetime. The JWT verifier applies a small clock-skew tolerance when checking expiry, so a session may continue to be accepted for a brief additional window past that point before it is rejected.

# Troubleshooting

* If you experience issues logging in, logging out, or accessing an organization you should have access to, try clearing your cookies & performing a full page refresh (`Cmd/Ctrl + Shift + R` on most browsers).
* Still not working? Reach out to us on our [discord](https://discord.gg/HDScTs3ptP) or [GitHub](https://github.com/sourcebot-dev/sourcebot/issues/new/choose)
