Skip to content

Commit

Permalink
Fix login issue when session exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgxvii committed Aug 19, 2024
1 parent bb9545c commit a3b29e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/consent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a3b29e5

Please sign in to comment.