diff --git a/packages/react/src/components/Auth/Auth.tsx b/packages/react/src/components/Auth/Auth.tsx index e1709699..3f482593 100644 --- a/packages/react/src/components/Auth/Auth.tsx +++ b/packages/react/src/components/Auth/Auth.tsx @@ -21,6 +21,7 @@ function Auth({ queryParams, view = 'sign_in', redirectTo, + resetPasswordRedirectTo, onlyThirdPartyProviders = false, magicLink = false, showLinks = true, @@ -176,7 +177,7 @@ function Auth({ appearance={appearance} supabaseClient={supabaseClient} setAuthView={setAuthView} - redirectTo={redirectTo} + redirectTo={resetPasswordRedirectTo ?? redirectTo} showLinks={showLinks} i18n={i18n} /> diff --git a/packages/shared/src/types.ts b/packages/shared/src/types.ts index c6648fad..3c070a44 100644 --- a/packages/shared/src/types.ts +++ b/packages/shared/src/types.ts @@ -89,6 +89,7 @@ export interface BaseAuth { queryParams?: { [key: string]: string } view?: ViewType redirectTo?: RedirectTo + resetPasswordRedirectTo?: RedirectTo onlyThirdPartyProviders?: boolean magicLink?: boolean showLinks?: boolean diff --git a/packages/solid/src/components/Auth/Auth.tsx b/packages/solid/src/components/Auth/Auth.tsx index 56c46c13..7364dc74 100644 --- a/packages/solid/src/components/Auth/Auth.tsx +++ b/packages/solid/src/components/Auth/Auth.tsx @@ -262,7 +262,9 @@ function Auth(props: AuthProps): JSX.Element | null { appearance={mergedProps().appearance} supabaseClient={mergedProps().supabaseClient} setAuthView={setAuthView} - redirectTo={mergedProps().redirectTo} + redirectTo={ + mergedProps().resetPasswordRedirectTo ?? mergedProps().redirectTo + } showLinks={mergedProps().showLinks} i18n={i18n()} /> diff --git a/packages/svelte/src/lib/Auth/Auth.svelte b/packages/svelte/src/lib/Auth/Auth.svelte index b21f3758..b7f906e9 100644 --- a/packages/svelte/src/lib/Auth/Auth.svelte +++ b/packages/svelte/src/lib/Auth/Auth.svelte @@ -27,6 +27,7 @@ export let queryParams: { [key: string]: string } | undefined = undefined; export let view: ViewType = 'sign_in'; export let redirectTo: string | undefined = undefined; + export let resetPasswordRedirectTo: string | undefined = undefined; export let onlyThirdPartyProviders = false; export let magicLink = false; export let showLinks = true; @@ -121,7 +122,7 @@ bind:authView={view} {showLinks} {appearance} - {redirectTo} + redirectTo={resetPasswordRedirectTo ?? redirectTo} /> {/if} {#if view === VIEWS.MAGIC_LINK}