Skip to content

Commit fb64abe

Browse files
committed
fix(auth): allow bind phone for signed-in users
1 parent 68feb6d commit fb64abe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/web/middleware.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ export default async function middleware(req: NextRequest) {
122122
const session = shouldFetchSession ? await getSession(req) : null;
123123

124124
if (pathname.startsWith("/auth")) {
125-
if (session && pathname !== "/auth/reset-password") {
125+
if (
126+
session &&
127+
pathname !== "/auth/reset-password" &&
128+
pathname !== "/auth/bind-phone"
129+
) {
126130
const redirectTo =
127131
req.nextUrl.searchParams.get("redirectTo") ??
128132
req.nextUrl.searchParams.get("callbackUrl");

0 commit comments

Comments
 (0)