Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update index.js #27

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 20, 2012
  1. @tonhagloops

    Update index.js

    tonhagloops authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 5 deletions.
  1. +6 −5 index.js
View
11 index.js
@@ -26,6 +26,7 @@ function OAuth2Provider(options) {
this.serializer = serializer.createSecureSerializer(this.options.crypt_key, this.options.sign_key);
}
+
OAuth2Provider.prototype = new EventEmitter();
OAuth2Provider.prototype.generateAccessToken = function(user_id, client_id, extra_data) {
@@ -98,11 +99,11 @@ OAuth2Provider.prototype.oauth = function() {
});
} else if(req.method == 'POST' && self.options.authorize_uri == uri) {
- var client_id = req.query.client_id,
- redirect_uri = req.query.redirect_uri,
- response_type = req.query.response_type || 'code',
- state = req.query.state,
- x_user_id = req.query.x_user_id;
+ var client_id = req.body.client_id,
+ redirect_uri = req.body.redirect_uri,
+ response_type = req.body.response_type || 'code',
+ state = req.body.state,
+ x_user_id = req.body.x_user_id;
var url = redirect_uri;
Something went wrong with that request. Please try again.