Kaynağa Gözat

feat(mobile): 使用mobile_token作为移动端token存储key

yourname 8 ay önce
ebeveyn
işleme
c61e899a27
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      client/mobile/hooks.tsx

+ 1 - 1
client/mobile/hooks.tsx

@@ -27,7 +27,7 @@ const ThemeContext = createContext<ThemeContextType | null>(null);
 // 认证提供者组件
 export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
   const [user, setUser] = useState<User | null>(null);
-  const [token, setToken] = useState<string | null>(getLocalStorageWithExpiry('token'));
+  const [token, setToken] = useState<string | null>(getLocalStorageWithExpiry('mobile_token'));
   const [isAuthenticated, setIsAuthenticated] = useState(false);
   const queryClient = useQueryClient();