File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,35 @@ declare module 'fastify' {
259
259
}
260
260
```
261
261
262
+ ## Provider Quirks
263
+
264
+ The following providers require additional work to be set up correctly.
265
+
266
+ ### Twitch
267
+
268
+ Twitch requires that the request for a token in the oauth2 flow contains the ` client_id ` and ` client_secret ` properties in ` tokenRequestParams ` :
269
+
270
+ ``` js
271
+ fastify .register (oauthPlugin, {
272
+ name: ' twitchOauth2' ,
273
+ credentials: {
274
+ client: {
275
+ id: ' <CLIENT_ID>' ,
276
+ secret: ' <CLIENT_SECRET>'
277
+ },
278
+ auth: oauthPlugin .TWITCH_CONFIGURATION
279
+ },
280
+ tokenRequestParams: {
281
+ client_id: ' <CLIENT_ID>' ,
282
+ client_secret: ' <CLIENT_SECRET>' ,
283
+ },
284
+ // register a fastify url to start the redirect flow
285
+ startRedirectPath: ' /login/twitch' ,
286
+ // twitch redirect here after the user login
287
+ callbackUri: ' http://localhost:3000/login/twitch/callback'
288
+ })
289
+ ```
290
+
262
291
## License
263
292
264
293
Licensed under [ MIT] ( ./LICENSE ) .
You can’t perform that action at this time.
0 commit comments