Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-authenticators

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-authenticators - npm Package Compare versions

Comparing version 0.2.0-experiiment-3 to 0.2.0-experiiment-4

11

lib/oauth2/OAuth2.js

@@ -111,6 +111,5 @@ "use strict";

const verifier = `${(0, crypto_1.randomUUID)()}-${(0, crypto_1.randomUUID)()}`;
yield store((0, lib_1.encodeSessionData)({
state,
verifier
}));
const nonce = (0, crypto_1.randomUUID)();
yield store((0, lib_1.encodeSessionData)(Object.assign({ state,
verifier }, this.options.addNonceToAuthorizeURL && { nonce })));
return `${this.config.consentURL}?\

@@ -127,5 +126,3 @@ ${new url_1.URLSearchParams(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ [__classPrivateFieldGet(this, _OAuth2_instances, "a", _OAuth2_clientIDQueryName_get)]: this.config.clientID, redirect_uri: this.config.redirectUri, state }, this.config.scope && { scope: this.config.scope }), { response_type: (_a = this.options.responseType) !== null && _a !== void 0 ? _a : 'code' }), this.options.enablePKCE && {

code_challenge_method: 'S256'
}), this.options.addNonceToAuthorizeURL && {
nonce: (0, crypto_1.randomUUID)(),
}), this.options.consentAdditionalParams)).toString()}`;
}), this.options.addNonceToAuthorizeURL && { nonce }), this.options.consentAdditionalParams)).toString()}`;
});

@@ -132,0 +129,0 @@ }

@@ -33,4 +33,5 @@ import OAuth2 from '../oauth2/OAuth2';

user: string;
nonce: any;
}>;
}
export {};

@@ -41,3 +41,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const { state: sessionState } = (0, lib_1.decodeSessionData)(pop());
const { state: sessionState, nonce } = (0, lib_1.decodeSessionData)(pop());
if (!(0, lib_1.safeCompare)(state, sessionState))

@@ -47,3 +47,3 @@ throw new OAuth2Error_1.default('Invalid returning state');

throw new OAuth2Error_1.default(error);
return { code, id_token, state, user };
return { code, id_token, state, user, nonce };
});

@@ -50,0 +50,0 @@ }

{
"name": "express-authenticators",
"version": "0.2.0-experiiment-3",
"version": "0.2.0-experiiment-4",
"description": "Third party authenticators in nodejs. Support various providers. Almost zero dependencies.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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