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
Auto-require omniauth-rails_csrf_protection in the gem entry point
Without this, a host app that uses `gem "activeadmin-oidc"` never
triggers the `omniauth-rails_csrf_protection` railtie: Bundler.require
only auto-requires top-level Gemfile entries, not transitive gemspec
dependencies. The result is that OmniAuth 2.x's Rack-level CSRF check
runs against `button_to` posts and rejects them with
OmniAuth::AuthenticityError.
Requiring the railtie from the gem's own entry point registers
OmniAuth::RailsCsrfProtection::Railtie with Rails before the
initializer phase runs, so Rails' forgery protection transparently
takes over for OmniAuth POSTs. Also pulls rails/railtie first so the
require is safe outside of a fully-booted Rails environment (e.g.
plain spec_helper contexts).
Hit live during end-to-end testing with the Zitadel demo app.
0 commit comments