14 lines
506 B
TypeScript
14 lines
506 B
TypeScript
import { ZitadelAuth } from './index.js';
|
|
import { Z as ZitadelAuthConfig, A as AuthState } from './types-C5b7Bv-t.js';
|
|
|
|
interface ZitadelSvelteAuth {
|
|
subscribe: (cb: (state: AuthState) => void) => () => void;
|
|
login: () => void;
|
|
logout: () => Promise<void>;
|
|
fetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
}
|
|
declare function createZitadelHandle(config: ZitadelAuthConfig): ZitadelSvelteAuth;
|
|
declare function getAuth(): ZitadelAuth;
|
|
|
|
export { createZitadelHandle, getAuth };
|