Skip to content

Loading…

Fixed access token duplicate generation #24

Merged
merged 1 commit into from

2 participants

@kbackowski

Access token is generated twice.

First for save_access_token function and second for request response. Therefore token saved in the database differ from the one in the response.

@ammmir ammmir merged commit 11969c6 into ammmir:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 4, 2012
  1. @kbackowski
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
View
2 index.js
@@ -170,7 +170,7 @@ OAuth2Provider.prototype.oauth = function() {
if(self.listeners('save_access_token').length > 0)
self.emit('save_access_token', user_id, client_id, atok);
- res.end(JSON.stringify(self.generateAccessToken(user_id, client_id, extra_data)));
+ res.end(JSON.stringify(atok));
});
self.emit('remove_grant', user_id, client_id, code);
Something went wrong with that request. Please try again.