-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
application doesn't authenticate correctly #1
Comments
What's your |
The version is |
GitHub enterprise is not supported yet. But you're welcome to create a PR. |
Ah, in that case, I might have a workaround for this, if I put my |
Yes, if it's an org on github.com. The OAuth app, client credentals, etc also need to be created on github.com. |
@n4bb12 I tried the changing the org to a GitHub based org, but I still get the same error. |
Could you update to the latest version and share the details of the error that's logged on the server? |
I can't do much with that, the messages are cut off 😅 |
ah my bad, {"level":30,"time":1695240732103,"pid":8,"hostname":"169.254.248.165","reqId":"req-3","req":{"method":"GET","url":"/oauth2/callback?state=%7B%22randomToken%22%3A%22YYnDQ-DSXBIn75T4RIYM7%22%2C%22path%22%3A%22%2F%22%7D.FTMjpm2IVbW0mR%2FvWAsMkGZJcgj6%2F7DfCNZAXxgGHKU&code=e1e5f198e57dac27aa6f","hostname":"deven-phd-notes.vercel.app","remoteAddress":"127.0.0.1","remotePort":41642},"msg":"incoming request"}
Error: State mismatch
at retrieveState (/var/task/node_modules/vercel-github-oauth-proxy/dist/github-oauth.js:136:19)
at Object.<anonymous> (/var/task/node_modules/vercel-github-oauth-proxy/dist/github-oauth.js:176:27)
at hookIterator (/var/task/node_modules/fastify/lib/hooks.js:409:10)
at next (/var/task/node_modules/fastify/lib/hooks.js:243:18)
at hookRunner (/var/task/node_modules/fastify/lib/hooks.js:265:5)
at handler (/var/task/node_modules/fastify/lib/handleRequest.js:68:7)
at handleRequest (/var/task/node_modules/fastify/lib/handleRequest.js:24:5)
at runPreParsing (/var/task/node_modules/fastify/lib/route.js:568:5)
at next (/var/task/node_modules/fastify/lib/hooks.js:237:9)
at Object.fastifyCookieHandler (/var/task/node_modules/@fastify/cookie/plugin.js:68:7)
{"level":30,"time":1695240732107,"pid":8,"hostname":"169.254.248.165","reqId":"req-3","res":{"statusCode":302},"responseTime":3.7812100000446662,"msg":"request completed"}
[
{
"level": 40,
"time": 1695240731509,
"pid": 8,
"hostname": "169.254.248.165",
"msg": "\"root\" path \"/var/task/build\" must exist"
},
{
"level": 30,
"time": 1695240731515,
"pid": 8,
"hostname": "169.254.248.165",
"reqId": "req-1",
"req": {
"method": "GET",
"url": "/",
"hostname": "deven-phd-notes-4yvu29dzd-deven367.vercel.app",
"remoteAddress": "127.0.0.1",
"remotePort": 41626
},
"msg": "incoming request"
},
{
"level": 30,
"time": 1695240731531,
"pid": 8,
"hostname": "169.254.248.165",
"reqId": "req-1",
"res": {
"statusCode": 302
},
"responseTime": 15.615247000008821,
"msg": "request completed"
}
] |
means the state cookie does not match the state URL parameter. The only reason I can think of why this might happen is that you initiate sign-in from a different domain. This is also supported by the two different hostnames I see in your logs:
Did you initiate the flow from https://deven-phd-notes.vercel.app? |
Yes |
Hey @n4bb12, thanks for creating this neat utility. I have currently configured this to work with my docusaurus site, but I get this error.
Here is my config
Can you please help me out here? TIA!
The text was updated successfully, but these errors were encountered: