New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

forgetLastIdentifier()

function forgetLastIdentifier(): void

Forgets the identifier used to pre-fill recovery. Does nothing when browser storage is unavailable.

Returns​

void

Example​

"use client"

import { forgetLastIdentifier } from "@ory/elements-react"

export function LogoutLink({ logoutUrl }: { logoutUrl: string }) {
return (
<a href={logoutUrl} onClick={() => forgetLastIdentifier()}>
Log out
</a>
)
}