Fix signup by using better-auth signUp and clearer register errors.

Route web registration through authClient.signUp.email, set explicit better-auth baseURL/secret for Docker, and harden the mobile register API with safeParse and readable validation messages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-26 00:00:29 -04:00
co-authored by Cursor
parent 463b1f503e
commit af1f4a5721
3 changed files with 120 additions and 34 deletions
+2
View File
@@ -21,6 +21,8 @@ const authentikOrigin =
: null;
export const auth = betterAuth({
baseURL: process.env.BETTER_AUTH_URL,
secret: process.env.AUTH_SECRET,
database: drizzleAdapter(db, {
provider: "pg",
schema: {