From c5e28c153c96e40ae32e6d3309a54f8deaad0141 Mon Sep 17 00:00:00 2001 From: Natsuki Katayama Date: Wed, 20 May 2026 17:56:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5=E3=82=92scrypt?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=A6Worker=20CPU?= =?UTF-8?q?=E5=88=B6=E9=99=90=E3=82=A8=E3=83=A9=E3=83=BC=E3=82=92=E8=A7=A3?= =?UTF-8?q?=E6=B6=88=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- api/src/lib/auth.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/lib/auth.ts b/api/src/lib/auth.ts index 5a10a78..3504c0c 100644 --- a/api/src/lib/auth.ts +++ b/api/src/lib/auth.ts @@ -1,6 +1,7 @@ import { env } from 'cloudflare:workers' import { betterAuth } from 'better-auth' import { drizzleAdapter } from 'better-auth/adapters/drizzle' +import { hashPassword, verifyPassword } from '@better-auth/utils/password' import { db } from '../db' import { Resend } from 'resend' @@ -11,6 +12,10 @@ export const auth = betterAuth({ emailAndPassword: { enabled: true, requireEmailVerification: true, + password: { + hash: hashPassword, + verify: ({ hash, password }) => verifyPassword(hash, password), + }, }, emailVerification: { sendVerificationEmail: async ({ user, url }) => {