Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
fix(mysql): Correctly aggregate tokens by clientid. (#576) r=@vladikoff
Browse files Browse the repository at this point in the history
  • Loading branch information
rfk authored and vladikoff committed Jul 4, 2018
1 parent 5d198fc commit 2c2cd22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/db/mysql/index.js
Expand Up @@ -193,7 +193,7 @@ const QUERY_PURGE_EXPIRED_TOKENS = 'DELETE FROM tokens WHERE clientId NOT IN (?)
// Returns the most recent token used with a client name and client id.
// Does not include clients that canGrant.
const QUERY_ACTIVE_CLIENT_TOKENS_BY_UID =
'SELECT tokens.clientId, tokens.createdAt, tokens.scope, clients.name ' +
'SELECT tokens.clientId AS id, tokens.createdAt, tokens.scope, clients.name ' +
'FROM tokens LEFT OUTER JOIN clients ON clients.id = tokens.clientId ' +
'WHERE tokens.userId=? AND tokens.expiresAt > NOW() AND clients.canGrant = 0;';
const DELETE_ACTIVE_TOKENS_BY_CLIENT_AND_UID =
Expand Down

0 comments on commit 2c2cd22

Please sign in to comment.