Skip to content

update refresh-token-grant errors #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/grant-types/refresh-token-grant-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ RefreshTokenGrantType.prototype.getRefreshToken = function(request, client) {
}

if (token.client.id !== client.id) {
throw new InvalidGrantError('Invalid grant: refresh token is invalid');
throw new InvalidGrantError('Invalid grant: refresh token was issued to another client');
}

if (token.refreshTokenExpiresAt && !(token.refreshTokenExpiresAt instanceof Date)) {
Expand Down Expand Up @@ -130,7 +130,7 @@ RefreshTokenGrantType.prototype.revokeToken = function(token) {
return promisify(this.model.revokeToken, 1).call(this.model, token)
.then(function(status) {
if (!status) {
throw new InvalidGrantError('Invalid grant: refresh token is invalid');
throw new InvalidGrantError('Invalid grant: refresh token is invalid or could not be revoked');
}

return token;
Expand Down
Loading