Comparing version 2.0.2 to 2.0.3
@@ -63,2 +63,3 @@ 'use strict'; | ||
query = _url$parse.query, | ||
currentState = this._options.state, | ||
code = query.code, | ||
@@ -71,3 +72,3 @@ state = query.state; | ||
} | ||
if (state !== this._options.state) { | ||
if (currentState && state !== currentState) { | ||
return; | ||
@@ -74,0 +75,0 @@ } |
{ | ||
"name": "amocrm-js", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "dist/AmoCRM.js", |
@@ -5,3 +5,3 @@ # AmoCRM | ||
Данная версия библиотеки поддерживает OAuth авторизацию и использует адреса AmoRM API v4. | ||
Данная версия библиотеки поддерживает OAuth авторизацию и использует адреса AmoCRM API v4. | ||
@@ -8,0 +8,0 @@ [Поблагодарить можно тут](https://yasobe.ru/na/cisterna_kofe_dlya_razrabot4ika_biblioteki_amocrm) |
@@ -25,2 +25,3 @@ import http from 'http'; | ||
const { query } = url.parse( request.url, true ), | ||
currentState = this._options.state, | ||
{ code, state } = query; | ||
@@ -31,3 +32,3 @@ response.end(); | ||
} | ||
if ( state !== this._options.state ) { | ||
if ( currentState && state !== currentState ) { | ||
return; | ||
@@ -34,0 +35,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
198619
4080