@criipto/verify-react
Version:
Verify SDK for React Single Page Applications
31 lines (30 loc) • 1.15 kB
TypeScript
export default function useCriiptoVerify(): {
result: import("./context").Result | null;
/**
* The claims of the decoded id_token (if available)
*/
claims: import("./context").Claims | null;
error: import("@criipto/auth-js").OAuth2Error | null;
loginWithRedirect: (params?: import("@criipto/auth-js/dist/types").RedirectAuthorizeParams | undefined) => Promise<void>;
loginWithPopup: (params?: import("@criipto/auth-js/dist/types").PopupAuthorizeParams | undefined) => Promise<void>;
acrValues: string[] | undefined;
/**
* Will be true when performing token exchange after redirect or during an initial SSO check
*/
isLoading: boolean;
/**
* Will be true until the first set of useEffect hooks have been called
*/
isInitializing: boolean;
/**
* Check if there is an existing SSO session.
*/
checkSession: () => Promise<void>;
/**
* Clear local session store and logout of any existing SSO session
*/
logout: (params?: {
redirectUri?: string | undefined;
state?: string | undefined;
} | undefined) => Promise<void>;
};