mirror of
https://github.com/hardillb/node-red-alexa-home-skill-web.git
synced 2025-12-21 09:42:32 +01:00
Add scope to respose
This commit is contained in:
2
oauth.js
2
oauth.js
@@ -45,7 +45,7 @@ server.exchange(oauth2orize.exchange.code({
|
|||||||
OAuth.RefreshToken.findOne({application:application, user: grant.user},function(error, refreshToken){
|
OAuth.RefreshToken.findOne({application:application, user: grant.user},function(error, refreshToken){
|
||||||
if (refreshToken){
|
if (refreshToken){
|
||||||
var expires = Math.round((token.expires - (new Date().getTime()))/1000);
|
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 {
|
} else {
|
||||||
// Shouldn't get here unless there is an error as there
|
// Shouldn't get here unless there is an error as there
|
||||||
// should be a refresh token if there is an access token
|
// should be a refresh token if there is an access token
|
||||||
|
|||||||
Reference in New Issue
Block a user