@propelauth/react
Version:
A React library for managing authentication, backed by PropelAuth
17 lines (16 loc) • 628 B
TypeScript
import { IAuthClient } from "@propelauth/javascript";
import { MutableRefObject } from "react";
declare type ClientRef = {
authUrl: string;
client: IAuthClient;
};
interface UseClientRefProps {
authUrl: string;
minSecondsBeforeRefresh?: number;
}
export declare const useClientRef: (props: UseClientRefProps) => {
clientRef: MutableRefObject<ClientRef | null>;
accessTokenChangeCounter: number;
};
export declare const useClientRefCallback: <I extends unknown[], O>(clientRef: MutableRefObject<ClientRef | null>, callback: (client: IAuthClient) => (...inputs: I) => O) => (...inputs: I) => O;
export {};