Skip to content

Commit

Permalink
SIKKA-5956[COMPLETED] SIKKA-5880[IN PROGRESS]
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansourkira committed Dec 13, 2023
1 parent 4c2f9bc commit 9e2da9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sikka/hajar",
"version": "1.1.30",
"version": "1.1.31",
"description": "Toolkit to create SaaS applications",
"author": "Sikka Software <contact@sikka.io> (http://sikka.io)",
"license": "MIT",
Expand Down
8 changes: 3 additions & 5 deletions src/core/authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@ class HajarAuth {
const newCustomer = await customer.save();

const token = this.jwt.sign({ userId: newUser._id }, this.secret);
const finalUser = {
...newCustomer.toObject(),
...newUser.toObject(),
};

return {
success: true,
user: finalUser,
user: { ...newUser.toObject() },
customer: { ...newCustomer.toObject() },
token,
};
} catch (error) {
Expand Down

0 comments on commit 9e2da9f

Please sign in to comment.