We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ac63e2 + 2c4a7fb commit c3800edCopy full SHA for c3800ed
src/handlers/callback.ts
@@ -68,10 +68,9 @@ export const callback = async (routerClient: RouterClient) => {
68
await routerClient.sessionManager.removeSessionItem("state");
69
70
if (postLoginRedirectURL && isRedirectAllowed(postLoginRedirectURL)) {
71
- const url = new URL(
72
- `${postLoginRedirectURL.startsWith("http") ? "" : routerClient.clientConfig.siteUrl}`,
73
- postLoginRedirectURL,
74
- );
+ const url = postLoginRedirectURL.startsWith('http')
+ ? new URL(postLoginRedirectURL)
+ : new URL(postLoginRedirectURL, routerClient.clientConfig.siteUrl);
75
state && url.searchParams.set("state", state);
76
return routerClient.redirect(url.toString());
77
}
0 commit comments