fix: filter out client_secret when storing OAuth client information

This commit is contained in:
Felix Weinberger 2025-08-14 17:03:12 +01:00
commit 36b9acc97e
No known key found for this signature in database

View file

@ -110,10 +110,17 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
}
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
saveClientInformationToSessionStorage({
serverUrl: this.serverUrl,
clientInformation,
clientInformation: safeInfo,
isPreregistered: false,
});
}