17 lines
554 B
TypeScript
17 lines
554 B
TypeScript
import { Ref } from 'vue';
|
|
import { Router } from 'vue-router';
|
|
import { Z as ZitadelAuthConfig, a as ZitadelUser } from './types-C5b7Bv-t.cjs';
|
|
|
|
interface ZitadelAuthReturn {
|
|
isAuthenticated: Ref<boolean>;
|
|
isLoading: Ref<boolean>;
|
|
user: Ref<ZitadelUser | null>;
|
|
error: Ref<string | null>;
|
|
login: () => void;
|
|
logout: () => Promise<void>;
|
|
fetch: (url: string, init?: RequestInit) => Promise<Response>;
|
|
}
|
|
declare function useZitadelAuth(router: Router, config: ZitadelAuthConfig): ZitadelAuthReturn;
|
|
|
|
export { useZitadelAuth };
|