Skip to content

Commit

Permalink
fix: console
Browse files Browse the repository at this point in the history
  • Loading branch information
coratgerl committed Sep 4, 2024
1 parent 5659615 commit 1c9b6f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/wabe-mongodb-launcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const runDatabase = async () => {

const res = await MongoMemoryReplSet.create({
binary: {
version: '6.0.9',
version: '7.0.11',
},
instanceOpts: [
{
Expand Down
10 changes: 10 additions & 0 deletions packages/wabe/src/authentication/providers/EmailPassword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export class EmailPassword
)
: await argon2.verify(userDatabasePassword, input.password)

console.log(JSON.stringify({ isPasswordEquals, input, user }, null, 2))

if (
!isPasswordEquals ||
input.email !== user.authentication?.emailPassword?.email
Expand Down Expand Up @@ -84,6 +86,14 @@ export class EmailPassword

if (users.length > 0) throw new Error('User already exists')

console.log({
input: input.password,
// biome-ignore lint/correctness/noConstantCondition: <explanation>
hash: typeof Bun
? await Bun.password.hash(input.password, 'argon2id')
: await argon2.hash(input.password),
})

return {
authenticationDataToSave: {
email: input.email,
Expand Down
2 changes: 1 addition & 1 deletion packages/wabe/src/graphql/tests/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ describe('GraphQL : E2E', () => {
})
})

it('should not signIn with emailPassword if the password is incorrect', async () => {
it.only('should not signIn with emailPassword if the password is incorrect', async () => {
expect(
client.request<any>(graphql.signInWith, {
input: {
Expand Down

0 comments on commit 1c9b6f5

Please sign in to comment.