We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1485b55 + 4c72110 commit 3210e11Copy full SHA for 3210e11
src/server/helpers/with-page-auth-required.ts
@@ -196,7 +196,7 @@ export const appRouteHandlerFactory =
196
: opts.returnTo;
197
const { redirect } = await import("next/navigation.js");
198
redirect(
199
- `${config.loginUrl}${returnTo ? `?returnTo=${encodeURIComponent(returnTo)}` : ""}`
+ `${config.loginUrl}${opts.returnTo ? `?returnTo=${returnTo}` : ""}`
200
);
201
}
202
return handler(params);
0 commit comments