You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can specify your own schema for the `startRedirectPath` end-point. It allows you to create a well-documented document when using `fastify-swagger` together.
91
+
Note: `schema` option will override the `tags` option without merge them.
92
+
93
+
```js
94
+
fastify.register(oauthPlugin, {
95
+
name:'facebookOAuth2',
96
+
credentials: {
97
+
client: {
98
+
id:'<CLIENT_ID>',
99
+
secret:'<CLIENT_SECRET>'
100
+
},
101
+
auth:oauthPlugin.FACEBOOK_CONFIGURATION
102
+
},
103
+
// register a fastify url to start the redirect flow
tags: ['facebook', 'oauth2'] // this will take the precedence
112
+
}
113
+
})
114
+
```
115
+
88
116
## Set custom state
89
117
90
118
The `generateStateFunction` accepts a function to generate the `state` parameter for the OAUTH flow. This function receives the Fastify's `request` object as parameter.
0 commit comments