Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: State Parameter Support With Authentication Workflow #77

Open
gjsjy opened this issue Oct 1, 2021 · 0 comments
Open

Enhancement: State Parameter Support With Authentication Workflow #77

gjsjy opened this issue Oct 1, 2021 · 0 comments

Comments

@gjsjy
Copy link

gjsjy commented Oct 1, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant