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
From what I can see, it looks like the state and stateCookie variables are not equal in the defaultCheckStateFunction function in the index.js of the package. But I have no idea why.
I'm pretty sure this is the issue I was facing here.
The module's cookie (oauth2-redirect-state) path set by startRedirectPath is set to /login, and your callbackUri is at /api/auth/[...] which is outside of /login.
When changing startRedirectPath to /github, the cookie path is /, so the cookie is available everywhere
When I was planning to submit a documentation fix for the cookie.path annotation in @fastify/fastify-cookie today, I found that it had already been addressed in version 9.4.0.
Prerequisites
Fastify version
4.26.2
Plugin version
7.8.0
Node.js version
20.5.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.4.1
Description
Hello,
While using the Github provider, I noticed something strange.
When setting the startRedirectPath, if you put a / in the path, it breaks the Github provider.
So, for example, if you set the startRedirectPath to /login/github and try to connect, you will get a result from the callback that looks like this
But, setting the startRedirectPath to something like /github instantly works, so I think there's a bug somewhere.
Maybe worth to know, I use the autoload to load all my routes like that :
From what I can see, it looks like the state and stateCookie variables are not equal in the defaultCheckStateFunction function in the index.js of the package. But I have no idea why.
Steps to Reproduce
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: