diff --git a/pages/consent.tsx b/pages/consent.tsx index 1a5ab5a..56fd2b5 100644 --- a/pages/consent.tsx +++ b/pages/consent.tsx @@ -48,7 +48,7 @@ const Consent = () => { const consentAction = submitter.value const consentChallenge = formData.get("consent_challenge") as string - const remember = formData.get("remember") as string + const remember = !!formData.get("remember") const grantScope = formData.getAll("grant_scope") as string[] if (!consentChallenge || !consentAction) { diff --git a/pages/login.tsx b/pages/login.tsx index 68ceaa7..257828c 100644 --- a/pages/login.tsx +++ b/pages/login.tsx @@ -58,7 +58,7 @@ const Login: NextPage = () => { // Otherwise we initialize it ory .createBrowserLoginFlow({ - refresh: Boolean(refresh), + refresh: loginChallenge? true : Boolean(refresh), aal: aal ? String(aal) : undefined, returnTo: returnTo ? String(returnTo) : undefined, loginChallenge: loginChallenge ? String(loginChallenge) : undefined,