Skip to content

Commit c5047ca

Browse files
authored
Merge pull request #715 from modelcontextprotocol/fweinberger/fix-sensitive-local-storage
fweinberger/fix sensitive local storage
2 parents 16edf53 + 36b9acc commit c5047ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

client/src/lib/auth.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,17 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
110110
}
111111

112112
saveClientInformation(clientInformation: OAuthClientInformation) {
113+
// Remove client_secret before storing (not needed after initial OAuth flow)
114+
const safeInfo = Object.fromEntries(
115+
Object.entries(clientInformation).filter(
116+
([key]) => key !== "client_secret",
117+
),
118+
) as OAuthClientInformation;
119+
113120
// Save the dynamically registered client information to session storage
114121
saveClientInformationToSessionStorage({
115122
serverUrl: this.serverUrl,
116-
clientInformation,
123+
clientInformation: safeInfo,
117124
isPreregistered: false,
118125
});
119126
}

0 commit comments

Comments
 (0)