Skip to content

Commit

Permalink
fix(sveltekit): adds the missing input field for redirectTo (#12315)
Browse files Browse the repository at this point in the history
Co-authored-by: Nico Domino <[email protected]>
  • Loading branch information
NazgoooAtanasov and ndom91 authored Dec 22, 2024
1 parent faf4c9f commit 166c397
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
: options?.redirectTo
const redirect =
options instanceof FormData ? options.get("redirect") : options?.redirectTo
const redirectTo = callbackUrl
const authorizationParamsInputs = authorizationParams
? typeof authorizationParams === "string" && authorizationParams
Expand All @@ -38,6 +39,9 @@
{#if redirect}
<input type="hidden" name="redirect" value={redirect} />
{/if}
{#if redirectTo}
<input type="hidden" name="redirectTo" value={redirectTo} />
{/if}
{#if authorizationParamsInputs}
{#each Object.entries(authorizationParamsInputs) as [key, value]}
<input type="hidden" name={`authorizationParams-${key}`} {value} />
Expand Down

0 comments on commit 166c397

Please sign in to comment.