Isaac Fimbres
Isaac Fimbres
BABetter Auth
Created by Isaac Fimbres on 2/26/2025 in #help
ERR_INVALID_ARG_TYPE
Hey, so suddenly my app auth just stopped working. if I go to a protected route I got redirected to the landing page, and if I try to login or signup I always get the same error now: ERROR [Better Auth]: Failed to create user TypeError: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date at Array.forEach (<anonymous>) { code: 'ERR_INVALID_ARG_TYPE' } I tried to change to my main branch, but it's still having the same behavior. Auth.js: import { betterAuth } from "better-auth"; import { nextCookies } from "better-auth/next-js"; import { drizzleAdapter } from "better-auth/adapters/drizzle"; import { db } from "@ideate/server/db"; export const auth = betterAuth({ plugins: [nextCookies()], database: drizzleAdapter(db, { provider: "pg", }), emailAndPassword: { enabled: true, autoSignIn: true, }, }); db schema (attached)
5 replies