🚩 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:
Linus Gasser 2025-11-19 15:05:00 +01:00 committed by GitHub
parent 69c6d023e1
commit e1fdd5b7e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 18 deletions

View file

@ -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,