mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
fix: forget-password token should be infered on the server
This commit is contained in:
@@ -5,7 +5,6 @@ import { auth } from "@/lib/auth";
|
||||
export default authMiddleware({
|
||||
customRedirect: async (session, request) => {
|
||||
const baseURL = request.nextUrl.origin;
|
||||
|
||||
if (request.nextUrl.pathname === "/dashboard" && !session) {
|
||||
return NextResponse.redirect(new URL("/sign-in", baseURL));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user