Yannik
BABetter Auth
•Created by Yannik on 5/11/2025 in #help
404 Error for /api/auth/sign-up
@Ping have you seen this
7 replies
BABetter Auth
•Created by Yannik on 5/11/2025 in #help
404 Error for /api/auth/sign-up
sure @Ping
import { betterAuth } from "better-auth";
import { twoFactor, anonymous, phoneNumber, emailOTP, admin, organization, bearer, captcha, haveIBeenPwned } from "better-auth/plugins"
import { passkey } from "better-auth/plugins/passkey"
import { prismaAdapter } from "better-auth/adapters/prisma";
import prisma from "$lib/server/prisma";
export const auth = betterAuth({
secret: process.env.BETTER_AUTH_SECRET as string,
baseURL: process.env.BETTER_AUTH_URL as string,
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
appName: "AuthClient2025",
plugins: [
twoFactor(),
anonymous(),
phoneNumber({
sendOTP: ({ phoneNumber, code }, request) => {
// Implement sending OTP code via SMS
}
}),
emailOTP({
async sendVerificationOTP({ email, otp, type }) {
// Implement the sendVerificationOTP method to send the OTP to the user's email address
},
}),
passkey(),
admin(),
organization(),
bearer(),
haveIBeenPwned(),
],
emailAndPassword: {
enabled: true
},
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
});
import { betterAuth } from "better-auth";
import { twoFactor, anonymous, phoneNumber, emailOTP, admin, organization, bearer, captcha, haveIBeenPwned } from "better-auth/plugins"
import { passkey } from "better-auth/plugins/passkey"
import { prismaAdapter } from "better-auth/adapters/prisma";
import prisma from "$lib/server/prisma";
export const auth = betterAuth({
secret: process.env.BETTER_AUTH_SECRET as string,
baseURL: process.env.BETTER_AUTH_URL as string,
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
appName: "AuthClient2025",
plugins: [
twoFactor(),
anonymous(),
phoneNumber({
sendOTP: ({ phoneNumber, code }, request) => {
// Implement sending OTP code via SMS
}
}),
emailOTP({
async sendVerificationOTP({ email, otp, type }) {
// Implement the sendVerificationOTP method to send the OTP to the user's email address
},
}),
passkey(),
admin(),
organization(),
bearer(),
haveIBeenPwned(),
],
emailAndPassword: {
enabled: true
},
socialProviders: {
google: {
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
},
},
});
7 replies
BABetter Auth
•Created by Yannik on 5/11/2025 in #help
404 Error for /api/auth/sign-up
any idea?
7 replies