Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d98f615

Browse files
committed
Update
1 parent 747ace8 commit d98f615

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

‎app/auth.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import NextAuth from 'next-auth';
22
import Credentials from 'next-auth/providers/credentials';
3-
import { compare } from 'bcryptjs';
3+
import { compare } from 'bcrypt-ts';
44
import { getUser } from 'app/db';
55
import { authConfig } from 'app/auth.config';
66

‎app/db.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import { drizzle } from 'drizzle-orm/postgres-js';
22
import { pgTable, serial, varchar } from 'drizzle-orm/pg-core';
33
import { eq } from 'drizzle-orm';
44
import postgres from 'postgres';
5-
import { genSaltSync, hashSync } from 'bcryptjs';
5+
import { genSaltSync, hashSync } from 'bcrypt-ts';
66

7+
// Optionally, if not using email/pass login, you can
8+
// use the Drizzle adapter for Auth.js / NextAuth
9+
// https://authjs.dev/reference/adapter/drizzle
710
let client = postgres(`${process.env.POSTGRES_URL!}?sslmode=require`);
811
let db = drizzle(client);
912

‎package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
"lint": "next lint"
88
},
99
"dependencies": {
10-
"@types/bcryptjs": "^2.4.6",
1110
"@types/node": "^20.10.5",
1211
"@types/react": "^18.2.45",
13-
"bcryptjs": "^2.4.3",
12+
"bcrypt-ts": "^5.0.0",
1413
"drizzle-orm": "^0.29.2",
1514
"geist": "^1.2.0",
1615
"next": "^14.0.4",

‎pnpm-lock.yaml‎

Lines changed: 6 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /