diff --git a/frontend/lib/authentication.ts b/frontend/lib/authentication.ts index 7a7db2e72..92479b358 100644 --- a/frontend/lib/authentication.ts +++ b/frontend/lib/authentication.ts @@ -55,12 +55,12 @@ export const signIn = async ( } try { - const { href } = JSON.parse(rawRedirectLocation) + const { url } = JSON.parse(rawRedirectLocation) if (redirect) { setTimeout(() => { - if (href) { - Router.push(href, undefined, { shallow, locale }) + if (url) { + Router.push(url, undefined, { shallow, locale }) } else { Router.back() } diff --git a/frontend/lib/redirect.ts b/frontend/lib/redirect.ts index 50e9e9ad9..5ce03b9c4 100644 --- a/frontend/lib/redirect.ts +++ b/frontend/lib/redirect.ts @@ -19,7 +19,7 @@ export default function redirect({ nookies.set( context, "redirect-back", - JSON.stringify({ as: context.asPath, href: context.pathname }), + JSON.stringify({ url: context.asPath }), { maxAge: 20 * 60, path: "/",