aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/oauth-model.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/oauth-model.js b/server/lib/oauth-model.js
index 45f796796..922ef0b1f 100644
--- a/server/lib/oauth-model.js
+++ b/server/lib/oauth-model.js
@@ -60,7 +60,7 @@ function getUser (username, password) {
60} 60}
61 61
62function revokeToken (token) { 62function revokeToken (token) {
63 return OAuthToken.getByRefreshToken(token.refreshToken).then(function (tokenDB) { 63 return OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(function (tokenDB) {
64 if (tokenDB) tokenDB.remove() 64 if (tokenDB) tokenDB.remove()
65 65
66 /* 66 /*
@@ -72,6 +72,7 @@ function revokeToken (token) {
72 */ 72 */
73 const expiredToken = tokenDB 73 const expiredToken = tokenDB
74 expiredToken.refreshTokenExpiresAt = new Date('2015-05-28T06:59:53.000Z') 74 expiredToken.refreshTokenExpiresAt = new Date('2015-05-28T06:59:53.000Z')
75
75 return expiredToken 76 return expiredToken
76 }) 77 })
77} 78}