Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d36801edc4 | ||
|
|
d2cac44198 | ||
|
|
6f394c3332 | ||
|
|
fdd205e533 | ||
|
|
eb052a7457 | ||
|
|
207b5a16d5 | ||
|
|
995620e868 |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,8 @@
|
||||
node_modules/
|
||||
*/node_modules/
|
||||
*/build/
|
||||
|
||||
**/node_modules/
|
||||
**/build/
|
||||
.DS_Store
|
||||
.env
|
||||
File diff suppressed because one or more lines are too long
@ -43,23 +43,30 @@ class Auth {
|
||||
return helpers.jwtSign(data);
|
||||
}
|
||||
|
||||
const newUser = await UsersDBApi.createFromAuth(
|
||||
{
|
||||
// Create new user with default role
|
||||
const newUser = await UsersDBApi.create(
|
||||
{ data: {
|
||||
firstName: email.split('@')[0],
|
||||
password: hashedPassword,
|
||||
email: email,
|
||||
},
|
||||
options,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Send verification email if configured
|
||||
if (EmailSender.isConfigured) {
|
||||
await this.sendEmailAddressVerificationEmail(newUser.email, host);
|
||||
}
|
||||
|
||||
// Fetch assigned role instance
|
||||
const roleInstance = await newUser.getApp_role();
|
||||
|
||||
// Build JWT payload including role
|
||||
const data = {
|
||||
user: {
|
||||
id: newUser.id,
|
||||
email: newUser.email,
|
||||
role: roleInstance ? roleInstance.name : null,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
1
frontend/json/runtimeError.json
Normal file
1
frontend/json/runtimeError.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
Loading…
x
Reference in New Issue
Block a user