Skip to content

Commit 5914b2b

Browse files
committed
fix(vercel): Keep search params for OAuth redirects
1 parent 921285c commit 5914b2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/routes/login._index/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default function LoginPage() {
128128
<div className="relative w-full">
129129
{data.lastAuthMethod === "github" && <LastUsedBadge />}
130130
<Form
131-
action={`/auth/github${data.redirectTo ? `?redirectTo=${data.redirectTo}` : ""}`}
131+
action={`/auth/github${data.redirectTo ? `?redirectTo=${encodeURIComponent(data.redirectTo)}` : ""}`}
132132
method="post"
133133
className="w-full"
134134
>
@@ -148,7 +148,7 @@ export default function LoginPage() {
148148
<div className="relative w-full">
149149
{data.lastAuthMethod === "google" && <LastUsedBadge />}
150150
<Form
151-
action={`/auth/google${data.redirectTo ? `?redirectTo=${data.redirectTo}` : ""}`}
151+
action={`/auth/google${data.redirectTo ? `?redirectTo=${encodeURIComponent(data.redirectTo)}` : ""}`}
152152
method="post"
153153
className="w-full"
154154
>

0 commit comments

Comments
 (0)