docs: standardize environment variable configuration instructions in authentication docs (#4880)
* 📝 (configuration-authentication.md): Improve formatting and readability of authentication configuration documentation. Add note recommending the use of a .env file for setting variables for security and maintainability.
* remove-export-note
---------
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
This commit is contained in:
parent
5307f0683f
commit
109b1acd03
1 changed files with 18 additions and 19 deletions
|
|
@ -40,11 +40,11 @@ python -m langflow run --env-file .env
|
||||||
|
|
||||||
5. Sign in with your username `admin` and password `securepassword`.
|
5. Sign in with your username `admin` and password `securepassword`.
|
||||||
6. To open the **Admin Page**, click your user profile image, and then select **Admin Page**.
|
6. To open the **Admin Page**, click your user profile image, and then select **Admin Page**.
|
||||||
You can also go to `http://127.0.0.1:7861/admin`.
|
You can also go to `http://127.0.0.1:7861/admin`.
|
||||||
7. To add a new user, click **New User**, and then add the **Username** and **Password**.
|
7. To add a new user, click **New User**, and then add the **Username** and **Password**.
|
||||||
8. To activate the new user, select **Active**.
|
8. To activate the new user, select **Active**.
|
||||||
The user can only sign in if you select them as **Active**.
|
The user can only sign in if you select them as **Active**.
|
||||||
9. To give the user `superuser` priveleges, click **Superuser**.
|
9. To give the user `superuser` privileges, click **Superuser**.
|
||||||
10. Click **Save**.
|
10. Click **Save**.
|
||||||
11. To confirm your new user has been created, sign out of Langflow, and then sign back in using your new **Username** and **Password**.
|
11. To confirm your new user has been created, sign out of Langflow, and then sign back in using your new **Username** and **Password**.
|
||||||
|
|
||||||
|
|
@ -57,6 +57,7 @@ Langflow provides a command-line utility for interactively creating superusers:
|
||||||
```bash
|
```bash
|
||||||
langflow superuser
|
langflow superuser
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Langflow prompts you for a **Username** and **Password**:
|
2. Langflow prompts you for a **Username** and **Password**:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -74,7 +75,7 @@ Superuser created successfully.
|
||||||
The following table lists the available authentication configuration variables, their descriptions, and default values:
|
The following table lists the available authentication configuration variables, their descriptions, and default values:
|
||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
|----------|-------------|---------|
|
| ----------------------------- | ------------------------------------- | ------- |
|
||||||
| `LANGFLOW_AUTO_LOGIN` | Enables automatic login | `True` |
|
| `LANGFLOW_AUTO_LOGIN` | Enables automatic login | `True` |
|
||||||
| `LANGFLOW_SUPERUSER` | Superuser username | - |
|
| `LANGFLOW_SUPERUSER` | Superuser username | - |
|
||||||
| `LANGFLOW_SUPERUSER_PASSWORD` | Superuser password | - |
|
| `LANGFLOW_SUPERUSER_PASSWORD` | Superuser password | - |
|
||||||
|
|
@ -88,7 +89,7 @@ By default, this variable is set to `True`. When enabled, Langflow operates as i
|
||||||
To disable automatic login and enforce user authentication:
|
To disable automatic login and enforce user authentication:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export LANGFLOW_AUTO_LOGIN=False
|
LANGFLOW_AUTO_LOGIN=False
|
||||||
```
|
```
|
||||||
|
|
||||||
### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD
|
### LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD
|
||||||
|
|
@ -97,8 +98,8 @@ These environment variables are only relevant when LANGFLOW_AUTO_LOGIN is set to
|
||||||
To create a superuser manually:
|
To create a superuser manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export LANGFLOW_SUPERUSER=admin
|
LANGFLOW_SUPERUSER=admin
|
||||||
export LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
||||||
```
|
```
|
||||||
|
|
||||||
### LANGFLOW_SECRET_KEY
|
### LANGFLOW_SECRET_KEY
|
||||||
|
|
@ -106,15 +107,13 @@ export LANGFLOW_SUPERUSER_PASSWORD=securepassword
|
||||||
This environment variable holds a secret key used for encrypting the superuser's password. Make sure to set this to a secure, randomly generated string.
|
This environment variable holds a secret key used for encrypting the superuser's password. Make sure to set this to a secure, randomly generated string.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
export LANGFLOW_SECRET_KEY=randomly_generated_secure_key
|
LANGFLOW_SECRET_KEY=randomly_generated_secure_key
|
||||||
```
|
```
|
||||||
|
|
||||||
### LANGFLOW_NEW_USER_IS_ACTIVE
|
### LANGFLOW_NEW_USER_IS_ACTIVE
|
||||||
|
|
||||||
By default, this variable is set to `False`. When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser.
|
By default, this variable is set to `False`. When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
LANGFLOW_NEW_USER_IS_ACTIVE=False
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue