File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ You can choose some default setup to assign to `auth` option.
63
63
- ` VKONTAKTE_CONFIGURATION `
64
64
- ` SPOTIFY_CONFIGURATION `
65
65
- ` DISCORD_CONFIGURATION `
66
+ - ` TWITCH_CONFIGURATION `
66
67
67
68
### Custom configuration
68
69
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ interface FastifyOAuth2 {
10
10
MICROSOFT_CONFIGURATION : ProviderConfiguration ;
11
11
SPOTIFY_CONFIGURATION : ProviderConfiguration ;
12
12
VKONTAKTE_CONFIGURATION : ProviderConfiguration ;
13
+ TWITCH_CONFIGURATION : ProviderConfiguration ;
13
14
}
14
15
15
16
export const fastifyOauth2 : FastifyPlugin < FastifyOAuth2Options > & FastifyOAuth2
Original file line number Diff line number Diff line change @@ -230,4 +230,11 @@ oauthPlugin.DISCORD_CONFIGURATION = {
230
230
tokenPath : '/api/oauth2/token'
231
231
}
232
232
233
+ oauthPlugin . TWITCH_CONFIGURATION = {
234
+ authorizeHost : 'https://id.twitch.tv' ,
235
+ authorizePath : '/oauth2/authorize' ,
236
+ tokenHost : 'https://id.twitch.tv' ,
237
+ tokenPath : '/oauth2/token'
238
+ }
239
+
233
240
module . exports = oauthPlugin
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ expectAssignable<ProviderConfiguration>(fastifyOauth2.LINKEDIN_CONFIGURATION);
57
57
expectAssignable < ProviderConfiguration > ( fastifyOauth2 . MICROSOFT_CONFIGURATION ) ;
58
58
expectAssignable < ProviderConfiguration > ( fastifyOauth2 . SPOTIFY_CONFIGURATION ) ;
59
59
expectAssignable < ProviderConfiguration > ( fastifyOauth2 . VKONTAKTE_CONFIGURATION ) ;
60
+ expectAssignable < ProviderConfiguration > ( fastifyOauth2 . TWITCH_CONFIGURATION ) ;
60
61
61
62
server . get ( '/testOauth/callback' , async request => {
62
63
expectType < OAuth2Namespace > ( server . testOAuthName ) ;
You can’t perform that action at this time.
0 commit comments