> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mage.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign in with OIDC

> Enable signing in with OIDC in Mage.

### Pre-requisites

First, you'll need to enable user authentication within Mage. You can find out more about
this in the [Overview page](https://docs.mage.ai/production/authentication/overview.md).

### Enable OIDC sign in

By default, users will not see the "Sign in with OIDC" option in their sign in page.

**1. Add Oauth application**

You will need to add Mage as a client for your OIDC provider. The way to do this will
be different depending on your OIDC provider. The redirect URL should be `https://<your-mage-url>/oauth`.

**2. Retrieve credentials**

Once you have registered Mage, you will need to retrieve the client ID, client secret,
and the OIDC discovery URL for your provider.

**3. Set environment variables**

Set the following environment variables in your Mage setup.

| Name | Value |
| - | - |
| `OIDC_DISCOVERY_URL` | `<oidc domain url>` |
| `OIDC_CLIENT_ID` | `<client id>` |
| `OIDC_CLIENT_SECRET` | `<client secret>` |

You should now see a "Sign in with OIDC" button when you start Mage and attempt to sign in.

Mage will fetch the following OIDC endpoints from the discovery URL:

* authorization\_endpoint
* token\_endpoint
* userinfo\_endpoint


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.