mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 04:46:05 +00:00
feat: add local auth support if api storage provided
This commit is contained in:
@@ -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,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user