Fix auth redirect URL being double encoded (#1280)

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Sasha Sorokin 2024-07-20 03:24:35 +03:00 committed by GitHub
parent 3a73994ad4
commit ba9dc6ce26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,13 +20,11 @@ export default defineNuxtRouteMiddleware(async (_to, from) => {
}
}
const redirect = encodeURIComponent(url.pathname + url.search);
return await navigateTo(
{
path: "/auth/sign-in",
query: {
redirect,
redirect: `${url.pathname}${url.search}`,
...extractedParams,
},
},