@@ -67,14 +67,14 @@ const oauthPlugin = fp(function (fastify, options, next) {
67
67
const generateCallbackUriParams = ( credentials . auth && credentials . auth [ kGenerateCallbackUriParams ] ) || defaultGenerateCallbackUriParams
68
68
const startRedirectPath = options . startRedirectPath
69
69
const tags = options . tags || [ ]
70
- const schema = options . schema || { tags : tags }
70
+ const schema = options . schema || { tags }
71
71
72
72
function generateAuthorizationUri ( requestObject ) {
73
73
const state = generateStateFunction ( requestObject )
74
74
const urlOptions = Object . assign ( { } , generateCallbackUriParams ( callbackUriParams , requestObject , scope , state ) , {
75
75
redirect_uri : callbackUri ,
76
- scope : scope ,
77
- state : state
76
+ scope,
77
+ state
78
78
} )
79
79
80
80
const authorizationUri = oauth2 . authorizationCode . authorizeURL ( urlOptions )
@@ -89,7 +89,7 @@ const oauthPlugin = fp(function (fastify, options, next) {
89
89
90
90
const cbk = function ( o , code , callback ) {
91
91
return callbackify ( o . oauth2 . authorizationCode . getToken . bind ( o . oauth2 . authorizationCode , {
92
- code : code ,
92
+ code,
93
93
redirect_uri : callbackUri
94
94
} ) ) ( callback )
95
95
}
@@ -135,7 +135,7 @@ const oauthPlugin = fp(function (fastify, options, next) {
135
135
136
136
try {
137
137
fastify . decorate ( name , {
138
- oauth2 : oauth2 ,
138
+ oauth2,
139
139
getAccessTokenFromAuthorizationCodeFlow,
140
140
getNewAccessTokenUsingRefreshToken,
141
141
generateAuthorizationUri
0 commit comments