LTI 1.3 integration broken "Cannot verify CSRF Token Authenticity" on cross-site OIDC redirect POST #194212
Replies: 2 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Great writeup — you've clearly diagnosed this correctly. The root cause is exactly what you described: This isn't an edge case either — it's a fundamental incompatibility between how Rails handles CSRF by default and what LTI 1.3's OIDC flow actually requires. The spec mandates The two fixes you listed are both valid, but they have different tradeoffs: Option 1 — Option 2 — Most LTI tool implementations go with Option 1 scoped to the redirect action specifically. Also worth noting — issue #72219 that you referenced has been open since October 2023 with no official response or fix, and reports are still coming in as recently as early 2026 across multiple Moodle versions. So you're not missing anything in your config — this is a confirmed, long-standing bug on GitHub Classroom's end. Your breakdown of the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
GitHub Classroom
Hi everyone,
We are integrating GitHub Classroom with Open edX via LTI 1.3 and hitting a blocking bug that affects the OIDC flow for all launches (both deep linking and resource link).
What happens:
After the LMS completes the OIDC authentication and auto-submits the JWT form POST to
https://classroom.github.com/lti1p3/openid-connect/redirect, GitHub Classroom responds with "Cannot verify CSRF Token Authenticity"Possible issues:
GitHub Classroom sets
_github_classroom_sessionwith SameSite=Lax. When the browser submits the cross-site form POST from the LMS domain to classroom.github.com, the browser correctly blocks this cookie per the SameSite=Lax spec.Without the session cookie, it cannot verify the CSRF token → 500.This is visible in browser DevTools the POST to
/lti1p3/openid-connect/redirecthas no _github_classroom_session cookie in the request headers.Evidence:
Fix required on GitHub Classroom's side (either):
This is a standard requirement for any LTI 1.3 tool, every cross-site POST in the OIDC flow will hit this.
References:
https://www.imsglobal.org/spec/security/v1p0/.
Beta Was this translation helpful? Give feedback.
All reactions