fix: filter out client_secret when storing OAuth client information
This commit is contained in:
parent
16edf53794
commit
36b9acc97e
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