Milos
Milos

Reputation: 366

Is there any valid reason why gem omniauth-rails_csrf_protection in only Rails 4.2+ compatible?

I was wondering is there any valid reason why omniauth-rails_csrf_protection is not compatible with the versions of Rails below 4.2? Are there some functionalities in Rails 4.2+ that are crucial for this gem to work, and hence can't be used with lower versions of Rails?

I would like to use omniauth-rails_csrf_protection with Rails 4.0 app. But it is not compatible.

Upvotes: 0

Views: 113

Answers (1)

Milos
Milos

Reputation: 366

I found the reason. So, it's the code from actionpack 4.2.0 that is used to make the omniauth-rails_csrf_protection gem work. In the token_verifier.rb a method verified_request? is called which is implemented in actionpack. But it was modified in actionpack 4.2.0, hence omniauth-rails_csrf_protection gem won't work with Rails version below 4.2.0.

Upvotes: 0

Related Questions