Skip to content

Commit

Permalink
SIKKA-6017[IN PROGRESS]
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansourkira committed Jan 6, 2024
1 parent 3f2c4e5 commit 0d4dbb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 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.46",
"version": "1.1.47",
"description": "Toolkit to create SaaS applications",
"author": "Sikka Software <[email protected]> (http://sikka.io)",
"license": "MIT",
Expand Down
13 changes: 1 addition & 12 deletions src/core/authentication/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,8 @@ class HajarAuth {
};
} else {
// User exists, perform login
const isPasswordCorrect = await this.bcrypt.compare(
googleUserData.password,
user.password
);

if (!isPasswordCorrect) {
throw new HajarError(
"Invalid email or password",
"invalid-email-password"
);
}

const customerData = await this.Customer.findOne({ profile: user._id });
const customerData = await this.Customer.findOne({ uid: user._id });
return {
success: true,
user: { ...user.toObject() },
Expand Down

0 comments on commit 0d4dbb0

Please sign in to comment.