Note to always skip the authenticity check

This commit is contained in:
Bobby McDonald 2020-12-04 13:27:23 -05:00 committed by GitHub
parent d7124ba525
commit 8ae62e54f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ something like this:
```ruby
class SessionsController < ApplicationController
skip_before_action :verify_authenticity_token, only: :create unless Rails.env.production?
# If you're using a strategy that POSTs during callback, you'll need to skip the authenticity token check for the callback action only.
skip_before_action :verify_authenticity_token, only: :create
def create
@user = User.find_or_create_from_auth_hash(auth_hash)