useStatus
A custom React hook to fetch and manage user status from your backend for address-based verifications.
Usage
import { useStatus } from "authento-react";
export const MyComponent = () => {
const { status, type, isLoading, refetch } = useStatus({
endpoint: "https://api.example.com/status",
refetchOnFocus: true
});
return (
<div>
<p>User Status: {isLoading ? "Loading..." : status}</p>
<p>User Type: {isLoading ? "Loading..." : type}</p>
<button onClick={refetch}>Refresh</button>
</div>
);
};Configuration
Return Value
Last updated