Skip to content

Commit b8f5d2c

Browse files
fix: filter out client_secret when storing OAuth client information
1 parent 16edf53 commit b8f5d2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/src/lib/auth.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,15 @@ 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(([key]) => key !== 'client_secret')
116+
) as OAuthClientInformation;
117+
113118
// Save the dynamically registered client information to session storage
114119
saveClientInformationToSessionStorage({
115120
serverUrl: this.serverUrl,
116-
clientInformation,
121+
clientInformation: safeInfo,
117122
isPreregistered: false,
118123
});
119124
}

0 commit comments

Comments
 (0)