export const auth = betterAuth({
// other config
hooks: {
after: createAuthMiddleware(async (ctx) => {
if (ctx.path.startsWith('/sign-in')) {
console.log("Redirecting to /test");
throw ctx.redirect('/test');
}
}),
}
})
export const auth = betterAuth({
// other config
hooks: {
after: createAuthMiddleware(async (ctx) => {
if (ctx.path.startsWith('/sign-in')) {
console.log("Redirecting to /test");
throw ctx.redirect('/test');
}
}),
}
})