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
The `generateStateFunction` accepts a function to generate the `state` parameter for the OAUTH flow. This function receives the Fastify instance's `request` object as parameter.
128
+
The `state` parameter will be also set into a `httpOnly`, `sameSite: Lax` cookie.
128
129
When you set it, it is required to provide the function `checkStateFunction` in order to validate the states generated.
129
130
130
131
```js
131
-
constvalidStates=newSet()
132
-
133
132
fastify.register(oauthPlugin, {
134
133
name:'facebookOAuth2',
135
134
credentials: {
@@ -146,12 +145,12 @@ When you set it, it is required to provide the function `checkStateFunction` in
0 commit comments