CSRF with GitHub Login #1150
-
Hi I'm trying to implement login with GitHub.
So the result is CSRF missing/invalid 403 error. PS I've read CSRF Pitfalls and can make Kratos work with all security set up but only for password flow. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
I assume you have gone over the OIDC guide. Could you link your Also what version/os/container/docker-compose are you using? Are you starting the login flow from a browser? |
Beta Was this translation helpful? Give feedback.
-
Oh, I found the problem. So I need to submit form with acquired CSRF token to self-service/methods/oidc/auth/ which sets ory_kratos_continuity cookie and then redirects to github |
Beta Was this translation helpful? Give feedback.
Oh, I found the problem.
It appeared that I went from UI to github.com/login/oauth/.... directly instead of using action and fields provided in response from kratos/self-service/login/flows.
So I need to submit form with acquired CSRF token to self-service/methods/oidc/auth/ which sets ory_kratos_continuity cookie and then redirects to github