Skip to content

Commit

Permalink
Update index.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila authored Sep 6, 2024
1 parent 7fb3643 commit 7ed913a
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions pages/docs/configuration/authentication/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Here's an overview of the general configuration.

> **Note:** OpenID does not support the ability to disable only registration.

>> **Quick Tip:** Even with registration disabled, add users directly to the database using `npm run create-user`. If you can't get npm to work, try `sudo docker exec -ti LibreChat sh` first to "ssh" into the container.
>> **Quick Tip:** To delete a user, you can run `docker-compose exec api npm run delete-user [email protected]`
Quick Tips:
- Even with registration disabled, you can add users directly to the database using the create-user script.
- To delete a user, you can use the delete-user script.

<div style={{display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column"}}>
<div className="image-light-theme">
Expand Down Expand Up @@ -94,3 +95,47 @@ To set up the mod system, review [the setup guide](/docs/configuration/mod_syste

> *Please Note: If you want this to work in development mode, you will need to create a file called `.env.development` in the root directory and set `DOMAIN_CLIENT` to `http://localhost:3090` or whatever port is provided by vite when runnning `npm run frontend-dev`*
## User Management Scripts

### Create User Script

The create-user script allows you to add users directly to the database, even when registration is disabled. Here's how to use it:

1. For the default docker-compose.yml:
```
docker-compose exec api npm run create-user
```

2. For the deploy-compose.yml:
```
docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run create-user"
```

3. For local development (from project root):
```
npm run create-user
```

Follow the prompts to enter the new user's email and password.

### Delete User Script

To delete a user, you can use the delete-user script:

1. For the default docker-compose.yml:
```
docker-compose exec api npm run delete-user [email protected]
```

2. For the deploy-compose.yml:
```
docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run delete-user [email protected]"
```

3. For local development (from project root):
```
npm run delete-user [email protected]
```

Replace `[email protected]` with the email of the user you want to delete.

0 comments on commit 7ed913a

Please sign in to comment.