Skip to content

Commit

Permalink
Pass client_id in authorize_form event.
Browse files Browse the repository at this point in the history
  • Loading branch information
ammmir committed Sep 6, 2011
1 parent 5c50467 commit b44e0e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ myOAP.on('enforce_login', function(req, res, authorize_url, next) {

// render the authorize form with the submission URL
// use two submit buttons named "allow" and "deny" for the user's choice
myOAP.on('authorize_form', function(req, res, authorize_url) {
myOAP.on('authorize_form', function(req, res, client_id, authorize_url) {
res.end('<html>this app wants to access your dialoggs account... <form method="post" action="' + authorize_url + '"><button name="allow">Allow</button><button name="deny">Deny</button></form>');
});

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OAuth2Provider.prototype.oauth = function() {

self.emit('enforce_login', req, res, authorize_url, function() {
// user is logged in, render approval page
self.emit('authorize_form', req, res, authorize_url);
self.emit('authorize_form', req, res, client_id, authorize_url);
});
});

Expand Down

0 comments on commit b44e0e2

Please sign in to comment.