20 lines
682 B
TypeScript
20 lines
682 B
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
import { ReactNode } from 'react';
|
|
import { Z as ZitadelAuthConfig, a as ZitadelUser } from './types-C5b7Bv-t.cjs';
|
|
|
|
interface ZitadelProviderProps extends ZitadelAuthConfig {
|
|
children: ReactNode;
|
|
}
|
|
declare function ZitadelProvider({ children, ...config }: ZitadelProviderProps): react_jsx_runtime.JSX.Element | null;
|
|
declare function useAuth(): {
|
|
login: () => void;
|
|
logout: () => Promise<void>;
|
|
fetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
isAuthenticated: boolean;
|
|
isLoading: boolean;
|
|
user: ZitadelUser | null;
|
|
error: string | null;
|
|
};
|
|
|
|
export { ZitadelProvider, useAuth };
|