Is there possibility to enhance getAuthorizeUrl to include "State" parameter?
var authURL = oauth2.getAuthorizeUrl({ redirect_uri: 'http://localhost:8080/code', scope: ['repo', 'user'], state: 'some random string to protect against cross-site request forgery attacks' });
Currently not passing down that params to OAuth
Uber.prototype.getAuthorizeUrl = function getAuthorizeUrl(scope) { if (!Array.isArray(scope)) { return new Error('Scope is not an array'); } if (scope.length === 0) { return new Error('Scope is empty'); } return this.oauth2.getAuthorizeUrl({ response_type: 'code', redirect_uri: this.defaults.redirect_uri, scope: scope.join(' ') }); };
Hi,
Is there possibility to enhance getAuthorizeUrl to include "State" parameter?
var authURL = oauth2.getAuthorizeUrl({ redirect_uri: 'http://localhost:8080/code', scope: ['repo', 'user'], state: 'some random string to protect against cross-site request forgery attacks' });
Currently not passing down that params to OAuth
Uber.prototype.getAuthorizeUrl = function getAuthorizeUrl(scope) { if (!Array.isArray(scope)) { return new Error('Scope is not an array'); } if (scope.length === 0) { return new Error('Scope is empty'); } return this.oauth2.getAuthorizeUrl({ response_type: 'code', redirect_uri: this.defaults.redirect_uri, scope: scope.join(' ') }); };
I appreciate your help here.
Thanks, Jo