Added docs showing how to integrate omniauth with rack_csrf

Fixes #1069
This commit is contained in:
Tiago 2022-05-16 23:08:32 +01:00 committed by GitHub
parent f35c0bb865
commit 7413f4fd73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,13 @@ environment information on the callback request. It is entirely up to
you how you want to implement the particulars of your application's you how you want to implement the particulars of your application's
authentication flow. authentication flow.
## rack_csrf
`omniauth` is not OOTB-compatible with [rack_csrf](https://github.com/baldowl/rack_csrf). In order to do so, the following code needs to be added to the application bootstrapping code:
```ruby
OmniAuth::AuthenticityTokenProtection.default_options(key: "csrf.token", authenticity_param: "_csrf")
```
## Rails (without Devise) ## Rails (without Devise)
To get started, add the following gems To get started, add the following gems