From 9e2f32b5e63525f2fd4a90d35d19c9454e98812a Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Fri, 2 Mar 2018 11:12:14 +0000 Subject: [PATCH] Fix this._deleteBearerToken is undefined error This context wasn't properly set in the catch block for refresh errors, so the token was never deleted. --- lib/oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oauth.js b/lib/oauth.js index c831254..840cedd 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -277,7 +277,7 @@ module.exports = new Model({ console.log(error); this._deleteBearerToken(); return null; - }); + }.bind(this)); }, _saveRedirectUri: function(redirectUri) {