express-authenticators
Advanced tools
Comparing version 0.2.0 to 0.2.1-beta1
@@ -21,2 +21,3 @@ import OAuth2 from '../oauth2/OAuth2'; | ||
scope?: string; | ||
ignoreStateCheck?: boolean; | ||
}); | ||
@@ -23,0 +24,0 @@ callback({ pop }: IPopSession, { code, id_token, state, user, error }: { |
@@ -42,3 +42,3 @@ "use strict"; | ||
const { state: sessionState, nonce } = (0, lib_1.decodeSessionData)(pop()); | ||
if (!(0, lib_1.safeCompare)(state, sessionState)) | ||
if (!this.childConfig.ignoreStateCheck && !(0, lib_1.safeCompare)(state, sessionState)) | ||
throw new OAuth2Error_1.default('Invalid returning state'); | ||
@@ -45,0 +45,0 @@ if (error) |
{ | ||
"name": "express-authenticators", | ||
"version": "0.2.0", | ||
"version": "0.2.1-beta1", | ||
"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
122823
1726