mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Server: fix refreshing token that fails
This commit is contained in:
parent
2c8a2f7fcc
commit
bf2fc85c83
2 changed files with 5 additions and 4 deletions
|
@ -60,7 +60,7 @@ function getUser (username, password) {
|
|||
}
|
||||
|
||||
function revokeToken (token) {
|
||||
return OAuthToken.getByRefreshToken(token.refreshToken).then(function (tokenDB) {
|
||||
return OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(function (tokenDB) {
|
||||
if (tokenDB) tokenDB.remove()
|
||||
|
||||
/*
|
||||
|
@ -72,6 +72,7 @@ function revokeToken (token) {
|
|||
*/
|
||||
const expiredToken = tokenDB
|
||||
expiredToken.refreshTokenExpiresAt = new Date('2015-05-28T06:59:53.000Z')
|
||||
|
||||
return expiredToken
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue