New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pega/auth

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pega/auth - npm Package Compare versions

Comparing version 0.2.20 to 0.2.21

56

lib/oauth-client/auth.js

@@ -710,3 +710,4 @@ export class PegaAuth {

}
const { clientId, clientSecret, revokeUri, secureCookie } = this.#config;
const { serverType, clientId, clientSecret, revokeUri, secureCookie } = this.#config;
const bLaunchpad = serverType === 'launchpad';
if (this.isNode && !this.crypto) {

@@ -717,3 +718,3 @@ // Deferring dynamic loading of node libraries til this first method to avoid doing this in constructor

const headers = { 'content-type': this.urlencoded };
if (clientSecret) {
if (clientSecret && !bLaunchpad) {
const basicCreds = btoa(`${clientId}:${clientSecret}`);

@@ -729,2 +730,6 @@ headers.authorization = `Basic ${basicCreds}`;

}
else if (bLaunchpad) {
formData.append('client_id', clientId);
formData.append('client_secret', clientSecret);
}
if (secureCookie) {

@@ -738,24 +743,29 @@ formData.append('send_token_as_cookie', 'true');

formData.append('token_type_hint', prop);
return fetch(revokeUri, {
agent: this.#getAgent(),
method: 'POST',
headers: new Headers(headers),
credentials: secureCookie ? 'include' : 'omit',
body: formData.toString()
})
.then(response => {
if (!response.ok) {
if (revokeUri) {
return fetch(revokeUri, {
agent: this.#getAgent(),
method: 'POST',
headers: new Headers(headers),
credentials: secureCookie ? 'include' : 'omit',
body: formData.toString()
})
.then(response => {
if (!response.ok) {
// eslint-disable-next-line no-console
console.error(`Error revoking ${prop}:${response.status}`);
}
})
.catch(e => {
// eslint-disable-next-line no-console
console.error(`Error revoking ${prop}:${response.status}`);
}
})
.catch(e => {
// eslint-disable-next-line no-console
console.error(`Error revoking ${prop}; ${e}`);
})
.finally(() => {
this.#dynState.silentAuthFailed = false;
// Also clobber any sessionIndex
this.#updateSessionIndex(null);
});
console.error(`Error revoking ${prop}; ${e}`);
})
.finally(() => {
this.#dynState.silentAuthFailed = false;
// Also clobber any sessionIndex
this.#updateSessionIndex(null);
});
}
this.#dynState.silentAuthFailed = false;
// Also clobber any sessionIndex
this.#updateSessionIndex(null);
}

@@ -762,0 +772,0 @@ // For userinfo endpoint to return meaningful data, endpoint must include appAlias (if specified) and authorize must

{
"name": "@pega/auth",
"version": "0.2.20",
"version": "0.2.21",
"description": "Pega OAuth 2.0 Client Library (supports Infinity and Launchpad).",

@@ -29,7 +29,7 @@ "repository": {

"lint:es": "eslint --color --cache --cache-location node_modules/.cache/eslint/ .",
"lint:format": "prettier --color --loglevel warn -c .",
"lint:format": "prettier --color --log-level warn -c .",
"lint:spelling": "cspell --color \"./**/*.@(ts|mts|cts|tsx|js|mjs|cjs|jsx|md|json|html)\" \"./@(*|.*)\" \".vscode/**\"",
"lint:pkg": "sort-package-json --check package.json packages/*/package.json",
"fix:es": "eslint --color --fix --cache --cache-location=node_modules/.cache/eslint/ .",
"fix:format": "prettier --color --loglevel warn -w .",
"fix:format": "prettier --color --log-level warn -w .",
"fix:pkg": "sort-package-json package.json packages/*/package.json"

@@ -36,0 +36,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc