fix: 添加better auth 接口配置

This commit is contained in:
imeepos
2026-01-13 14:58:48 +08:00
parent 02d0c807cd
commit 9fa65a9ac3
10 changed files with 720 additions and 7376 deletions

17
lib/storage.ts Normal file
View File

@@ -0,0 +1,17 @@
declare const window: any;
export const storage = {
async getItem(key: string): Promise<string | null> {
if (typeof window === "undefined") return null;
return window.localStorage.getItem(key);
},
async setItem(key: string, value: string): Promise<void> {
if (typeof window === "undefined") return;
window.localStorage.setItem(key, value);
},
async removeItem(key: string): Promise<void> {
if (typeof window === "undefined") return;
window.localStorage.removeItem(key);
},
};