Skip to content

Commit 0afeb0f

Browse files
committed
feat: send mail feature
1 parent 7223672 commit 0afeb0f

File tree

4 files changed

+1107
-338
lines changed

4 files changed

+1107
-338
lines changed

apps/web/@/actions/auth/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use server"
22

3-
import bcrypt from "bcrypt"
3+
import bcryptjs from "bcryptjs"
44
import { signIn, signOut } from "configs/auth"
55
import { Prisma } from "database"
66
import { createUser } from "database/src/users/queries"
@@ -33,7 +33,7 @@ export const signUp = async (
3333
try {
3434
// hash password
3535
const { email, password } = data
36-
const hashedPassword = await bcrypt.hash(password, 10)
36+
const hashedPassword = await bcryptjs.hash(password, 10)
3737

3838
await createUser({
3939
data: {

apps/web/configs/auth.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ export const {
3131
},
3232
})
3333

34-
// const user = await prisma.user.findUnique({
35-
// where: {
36-
// email: credentials.email,
37-
// password: credentials.password,
38-
// },
39-
// })
40-
4134
if (!user) {
4235
return null
4336
}

apps/web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"dependencies": {
1313
"@auth/prisma-adapter": "^1.0.3",
1414
"@hookform/resolvers": "^3.3.1",
15+
"@react-email/components": "^0.0.25",
1516
"@tiptap/extension-blockquote": "^2.1.13",
1617
"@tiptap/extension-bold": "^2.1.13",
1718
"@tiptap/extension-bullet-list": "^2.1.13",
@@ -31,7 +32,6 @@
3132
"@tiptap/react": "^2.1.7",
3233
"@tiptap/starter-kit": "^2.1.7",
3334
"autoprefixer": "^10.4.15",
34-
"bcrypt": "^5.1.1",
3535
"bcryptjs": "^2.4.3",
3636
"class-variance-authority": "^0.7.0",
3737
"clsx": "^2.0.0",
@@ -58,6 +58,7 @@
5858
"react-dom": "^18.2.0",
5959
"react-dropzone": "^14.2.3",
6060
"react-editor-js": "^2.1.0",
61+
"react-email": "^3.0.1",
6162
"react-hook-form": "^7.46.1",
6263
"react-html-parser": "^2.0.2",
6364
"react-select": "^5.8.0",

0 commit comments

Comments
 (0)