wnbot
wnbot
BABetter Auth
Created by wnbot on 2/24/2025 in #help
Can I use both Bearer token and cookie session?
Bearer token for api, cookie session for web pages
2 replies
BABetter Auth
Created by wnbot on 2/21/2025 in #help
What if sending email failed?
For the code below, what if sendEmail failed, how can i catch the error on client side?
import { betterAuth } from "better-auth"
import { emailOTP } from "better-auth/plugins"

export const auth = betterAuth({
// ... other config options
plugins: [
emailOTP({
async sendVerificationOTP({ email, otp, type}) {
sendEmail(email, opt);
},
})
]
})
import { betterAuth } from "better-auth"
import { emailOTP } from "better-auth/plugins"

export const auth = betterAuth({
// ... other config options
plugins: [
emailOTP({
async sendVerificationOTP({ email, otp, type}) {
sendEmail(email, opt);
},
})
]
})
I am using resend, and got a error for resend when sending email:
{
statusCode: 403,
message: "...",
name: 'validation_error'
}
{
statusCode: 403,
message: "...",
name: 'validation_error'
}
but I can not get the error on client side.
3 replies
BABetter Auth
Created by wnbot on 12/20/2024 in #help
Is it possible to auth both nextjs and mobile app (android/iOS)?
Suppose I have a nextjs application using better auth which use cookie session, and I also have an android/iOS app which want to use token session, the web app and mobile app share same nextjs server. is it possible to do that? If it can be achieved, can OAuth also be achieved?
3 replies