Rails facebook app returns 422 "change error and refused"

My facebook has just been approved today. However, when I clicked the “Go to Application” button, it returned “Rail” 422 “The change you wanted was rejected. Error” I set my Canvas URL to the URL of my site and I use Omniauth, so I just wondering what i missed.

+3
source share
2 answers

Try to remove

protect_from_forgery

In application_controller or

# you can disable csrf protection on controller-by-controller basis:
skip_before_filter :verify_authenticity_token

Facebook uses signed_request, which you can decode and use to verify that the request really comes from facebook, so the_from_forgery protection is not needed for applications accessible only through facebook canvas.

: Canvas Authentication ActionController:: RequestForgeryProtection

+11

omniauth Facebook ", , " - , . , , , facebook .

. heroku logs -t

0

Source: https://habr.com/ru/post/1783976/


All Articles