﻿# Configure administrator authentication in BRIX AI

> [HTML Version](cortex-auth-settings.html)

Select the preferred login method for administrators in **BRIX AI**:

- No authentication. By default, any user opening **BRIX AI** logs in automatically as an administrator.

- Authentication via BRIX. Log in using BRIX credentials.

**Important**: If a user previously logged in to **BRIX AI** using a different method, changing the authentication settings may require clearing browser data.

## No authentication

Authentication is disabled by default, meaning any user who opens **BRIX AI** automatically logs in as an administrator. For security reasons, configure sign-in using BRIX.

To disable authentication again, set the `AUTH\_MODE` parameter to `Dummy` in the `.env` environment variables file. Apply the setting by running the following command:

````
./install.sh

## ````
Authentication via BRIX

You can configure authentication in **BRIX AI** using BRIX via OAuth 2.0. Administrators can then sign in to **BRIX AI** with their BRIX username and password.

To do this:

1. In BRIX, [download the BRIX AI integration module](cortex-integration-solution.md), create an OAuth 2.0 client, and obtain the unique external app ID and secret.

2. In **BRIX AI**, set the following parameters in the `.env` environment variables file:

	- `AUTH\_MODE`: Set to `ELMA365`.

	- `AUTH\_CLIENT\_OAUTH\_AUTHORITY`: Enter the URL of the BRIX environment where the OAuth 2.0 client is configured, for example, `https://company.brix365.com`.

	- `AUTH\_CLIENT\_OAUTH\_CLIENT\_ID`: Enter the unique application ID.

	- `AUTH\_CLIENT\_OAUTH\_CLIENT\_SECRET`: Enter the application secret.

	- `AUTH\_CLIENT\_OAUTH\_SCOPE`: Leave the value as `openid api`.

	- `AUTH\_CLIENT\_OAUTH\_REMEMBER`: Enable or disable saving user credentials by setting `true` or `false`.

	- `AUTH\_CLIENT\_OAUTH\_EXPIRES\_IN`: User session duration in ISO 8601 format. For example, enter `P30D` for 30 days.

3. The settings apply during the installation of **BRIX AI**. If installation is complete, rerun the installation script to apply new settings:

````
./install.sh
````