From a56193d98aa622873872106a73b79e3d56ac5874 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Wed, 20 Jun 2018 21:21:14 +0100 Subject: [PATCH] Add scope to respose --- oauth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth.js b/oauth.js index 46f61b5..d9c444a 100644 --- a/oauth.js +++ b/oauth.js @@ -45,7 +45,7 @@ server.exchange(oauth2orize.exchange.code({ OAuth.RefreshToken.findOne({application:application, user: grant.user},function(error, refreshToken){ if (refreshToken){ var expires = Math.round((token.expires - (new Date().getTime()))/1000); - done(null,token.token, refreshToken.token,{token_type: 'Bearer', expires_in: expires}); + done(null,token.token, refreshToken.token,{token_type: 'Bearer', expires_in: expires, scope: token.scope}); } else { // Shouldn't get here unless there is an error as there // should be a refresh token if there is an access token