Removed Zustand storage, cleanup up auth storage IO interfaces, implementations, and usage.

This commit is contained in:
Bob Dickinson 2026-07-04 21:56:45 -07:00
commit 3c65bdb4c6

View file

@ -1,16 +1,14 @@
import { createJSONStorage } from "zustand/middleware";
import { OAuthStorageBase } from "../oauth-storage.js";
import { createOAuthStore } from "../store.js";
import { OAuthMemoryStore } from "../store.js";
import { createSessionOAuthPersistBackend } from "../oauth-persist.js";
/**
* Browser storage implementation using Zustand with sessionStorage.
* Browser storage implementation using sessionStorage.
* For web client (can be used by InspectorClient in browser).
*/
export class BrowserOAuthStorage extends OAuthStorageBase {
constructor() {
// Use Zustand's built-in sessionStorage adapter
// The `name` option in persist() ("mcp-inspector-oauth") becomes the sessionStorage key
super(createOAuthStore(createJSONStorage(() => sessionStorage)));
super(new OAuthMemoryStore(), createSessionOAuthPersistBackend());
}
}