feat: add local auth support if api storage provided

This commit is contained in:
dswbx
2025-12-02 18:18:45 +01:00
parent 506c7d84cc
commit acc10377ca
20 changed files with 193 additions and 174 deletions

View File

@@ -18,6 +18,7 @@ type UseAuth = {
logout: () => Promise<void>;
verify: () => Promise<void>;
setToken: (token: string) => void;
local: boolean;
};
export const useAuth = (options?: { baseUrl?: string }): UseAuth => {
@@ -60,5 +61,6 @@ export const useAuth = (options?: { baseUrl?: string }): UseAuth => {
logout,
setToken,
verify,
local: !!api.options.storage,
};
};