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
19
19
declare namespace fastifyOauth2 {
20
20
export interface FastifyOAuth2Options {
21
21
name : string ;
22
- scope : string [ ] ;
22
+ scope ? : string [ ] ;
23
23
credentials : Credentials ;
24
24
callbackUri : string ;
25
25
callbackUriParams ?: Object ;
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ const credentials: Credentials = {
15
15
} ,
16
16
auth : auth ,
17
17
} ;
18
+
19
+ const OAuth2NoneOptional : FastifyOAuth2Options = {
20
+ name : 'testOAuthName' ,
21
+ credentials : credentials ,
22
+ callbackUri : 'http://localhost/testOauth/callback'
23
+ } ;
24
+
18
25
const OAuth2Options : FastifyOAuth2Options = {
19
26
name : 'testOAuthName' ,
20
27
scope : scope ,
@@ -28,6 +35,7 @@ const OAuth2Options: FastifyOAuth2Options = {
28
35
29
36
const server = fastify ( ) ;
30
37
38
+ server . register ( fastifyOauth2 , OAuth2NoneOptional )
31
39
server . register ( fastifyOauth2 , OAuth2Options ) ;
32
40
33
41
server . register ( fastifyOauth2 , {
You can’t perform that action at this time.
0 commit comments