File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ interface FastifyOauth2 extends FastifyPluginCallback<fastifyOauth2.FastifyOAuth
1919declare namespace fastifyOauth2 {
2020 export interface FastifyOAuth2Options {
2121 name : string ;
22- scope : string [ ] ;
22+ scope ? : string [ ] ;
2323 credentials : Credentials ;
2424 callbackUri : string ;
2525 callbackUriParams ?: Object ;
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ const credentials: Credentials = {
1515 } ,
1616 auth : auth ,
1717} ;
18+
19+ const OAuth2NoneOptional : FastifyOAuth2Options = {
20+ name : 'testOAuthName' ,
21+ credentials : credentials ,
22+ callbackUri : 'http://localhost/testOauth/callback'
23+ } ;
24+
1825const OAuth2Options : FastifyOAuth2Options = {
1926 name : 'testOAuthName' ,
2027 scope : scope ,
@@ -28,6 +35,7 @@ const OAuth2Options: FastifyOAuth2Options = {
2835
2936const server = fastify ( ) ;
3037
38+ server . register ( fastifyOauth2 , OAuth2NoneOptional )
3139server . register ( fastifyOauth2 , OAuth2Options ) ;
3240
3341server . register ( fastifyOauth2 , {
You can’t perform that action at this time.
0 commit comments