Merge pull request #715 from modelcontextprotocol/fweinberger/fix-sensitive-local-storage
fweinberger/fix sensitive local storage
This commit is contained in:
commit
c5047ca30a
1 changed files with 8 additions and 1 deletions
|
|
@ -110,10 +110,17 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
saveClientInformation(clientInformation: OAuthClientInformation) {
|
saveClientInformation(clientInformation: OAuthClientInformation) {
|
||||||
|
// Remove client_secret before storing (not needed after initial OAuth flow)
|
||||||
|
const safeInfo = Object.fromEntries(
|
||||||
|
Object.entries(clientInformation).filter(
|
||||||
|
([key]) => key !== "client_secret",
|
||||||
|
),
|
||||||
|
) as OAuthClientInformation;
|
||||||
|
|
||||||
// Save the dynamically registered client information to session storage
|
// Save the dynamically registered client information to session storage
|
||||||
saveClientInformationToSessionStorage({
|
saveClientInformationToSessionStorage({
|
||||||
serverUrl: this.serverUrl,
|
serverUrl: this.serverUrl,
|
||||||
clientInformation,
|
clientInformation: safeInfo,
|
||||||
isPreregistered: false,
|
isPreregistered: false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue