Karan
Karan
BABetter Auth
Created by Karan on 4/17/2025 in #bug-reports
Starting v1.2.6 `database.generateId = false` still inserts Id into the verification table
On v1.2.6 onward (was working in v1.2.5), when setting database.generateId = false Id is still being generated for the verification table. I'm using pg with kysely-postgres-js
Postgres query
attributes: {
"query": "insert into \"verification\" (\"identifier\", \"value\", \"expires_ts\", \"created_ts\", \"updated_ts\", \"id\") values ($1, $2, $3, $4, $5, $6) returning *",
"params": [
"c571Bde4aYfNW31g0Px7Rz5pSnZanSCr",
"{\"callbackURL\":\"http://localhost:3000/auth/dashboard\",\"codeVerifier\":\"T5_-2C_NSaAXe4nWOLNhgBgXwxt2JNncforilM3PhfZ_PSwJUcuejqF1xisvtJbztmUh55bIrVJ2MENH1fGc9pNKawRx3vom-d1ByYpEYylCyRR8lWIuwHcUkNJdVH1g\",\"expiresAt\":1744898245475}",
"2025-04-17T13:57:25.475Z",
"2025-04-17T13:47:25.475Z",
"2025-04-17T13:47:25.475Z",
"73F7RfMVgfbtZNQtcuqjnDY2ILvgqBAJ"
]
Postgres query
attributes: {
"query": "insert into \"verification\" (\"identifier\", \"value\", \"expires_ts\", \"created_ts\", \"updated_ts\", \"id\") values ($1, $2, $3, $4, $5, $6) returning *",
"params": [
"c571Bde4aYfNW31g0Px7Rz5pSnZanSCr",
"{\"callbackURL\":\"http://localhost:3000/auth/dashboard\",\"codeVerifier\":\"T5_-2C_NSaAXe4nWOLNhgBgXwxt2JNncforilM3PhfZ_PSwJUcuejqF1xisvtJbztmUh55bIrVJ2MENH1fGc9pNKawRx3vom-d1ByYpEYylCyRR8lWIuwHcUkNJdVH1g\",\"expiresAt\":1744898245475}",
"2025-04-17T13:57:25.475Z",
"2025-04-17T13:47:25.475Z",
"2025-04-17T13:47:25.475Z",
"73F7RfMVgfbtZNQtcuqjnDY2ILvgqBAJ"
]
3 replies
BABetter Auth
Created by Karan on 3/30/2025 in #help
Any way to get cookies from client signIn methods when used as server action?
Any example
"use server";

import { signIn } from "@/src/lib/auth-client";
import { redirect } from "next/navigation";

export async function verifyEmailOtp(formData: FormData) {
const { error, data } = await signIn.emailOtp({
email: formData.get("email")?.toString() as string,
otp: formData.get("otp")?.toString() as string,
});
redirect("/auth/dashboard");
});
"use server";

import { signIn } from "@/src/lib/auth-client";
import { redirect } from "next/navigation";

export async function verifyEmailOtp(formData: FormData) {
const { error, data } = await signIn.emailOtp({
email: formData.get("email")?.toString() as string,
otp: formData.get("otp")?.toString() as string,
});
redirect("/auth/dashboard");
});
6 replies
BABetter Auth
Created by Karan on 3/29/2025 in #help
CSRF with Next.js server directive w/ Backend Api
For CSRF to work (with Next.js server directive), so that the client requests get forwarded from the Next.js server to our BetterAuth backend API, do we need to manually forward all of the headers to the backend API?
5 replies