mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🚩 feat: Add --provider flag to create-user script (#10572)
As we're using google authentication without automatic sign-up, we need a way to pass the provider to the user creation.
This commit is contained in:
parent
69c6d023e1
commit
e1fdd5b7e8
2 changed files with 18 additions and 18 deletions
|
|
@ -176,7 +176,7 @@ const registerUser = async (user, additionalData = {}) => {
|
|||
return { status: 404, message: errorMessage };
|
||||
}
|
||||
|
||||
const { email, password, name, username } = user;
|
||||
const { email, password, name, username, provider } = user;
|
||||
|
||||
let newUserId;
|
||||
try {
|
||||
|
|
@ -207,7 +207,7 @@ const registerUser = async (user, additionalData = {}) => {
|
|||
|
||||
const salt = bcrypt.genSaltSync(10);
|
||||
const newUserData = {
|
||||
provider: 'local',
|
||||
provider: provider ?? 'local',
|
||||
email,
|
||||
username,
|
||||
name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue