You’re viewing the 2.0 (LTS) docs. View the current 3.0 version of this page.
useIssueJwt hook provides functionality to request Para JWT tokens that contain attestations for the user’s ID, identity, and provisioned wallets.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook for issuing JWT tokens for session verification
useIssueJwt hook provides functionality to request Para JWT tokens that contain attestations for the user’s ID, identity, and provisioned wallets.
import { useIssueJwt } from "@getpara/react-sdk";
function JwtTokenManager() {
const { issueJwt, issueJwtAsync, isPending, error } = useIssueJwt();
const [tokenInfo, setTokenInfo] = useState<{ token: string; keyId: string } | null>(null);
const handleIssueToken = async () => {
try {
const result = await issueJwtAsync();
setTokenInfo({
token: result.token,
keyId: result.keyId
});
await sendTokenToBackend(result.token);
} catch (err) {
console.error("Failed to issue JWT:", err);
}
};
return (
<button
onClick={handleIssueToken}
disabled={isPending}
>
{isPending ? "Issuing..." : "Issue JWT Token"}
</button>
);
}