useTokenVerifyPopup
A custom React hook to launch a token verification popup for account-based verifications.
Usage
import { useTokenVerifyPopup } from "authento-react";
export const MyComponent = () => {
const { verify, status } = useTokenVerifyPopup({
endpoint: "https://api.example.com/jwt",
params: {
verificationType: "BASIC",
lang: "fr",
},
});
return (
<div>
<button onClick={verify}>Verify</button>
{status === "fetching" && <p>Fetching verification token</p>}
{status === "success" && <p>Verification token fetched successfully</p>}
{status === "error" && <p>Failed to fetch verification token</p>}
</div>
);
};Configuration
Return Value
Last updated