Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/recovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { KernLogo } from "@/pkg/ui/Icons"

const Recovery: NextPage = () => {
const router = useRouter()
const { flow: flowId } = router.query
const { flow: flowId, return_to: returnTo } = router.query

const [flow, setFlow] = useState<RecoveryFlow>()

Expand All @@ -26,7 +26,7 @@ const Recovery: NextPage = () => {
data = res.data
} else {
const res = await ory.createBrowserRecoveryFlow({
returnTo: "/settings",
returnTo: returnTo ? String(returnTo) : undefined,
})
data = res.data
}
Expand Down Expand Up @@ -56,7 +56,7 @@ const Recovery: NextPage = () => {
}

fetchFlow()
}, [router.isReady, flowId])
}, [router.isReady, flowId, returnTo])

const onSubmit = (values: UpdateRecoveryFlowBody) =>
router
Expand Down