I am using https://github.com/pelle/oauth-plugin .
When I use "before_filter :oauth_required" at the top of a controller it fails the controller and gives "Invalid OAuth Request" even though when I have authorized the action. ie if I take this line out my controller will work properly, calling the google api via oauth and it works....
Any advice how to fix this? Or is there another approach I should be using?
The author of the plugin recommends using oauthenticate
instead of oauth_required
(see line 114 )
Replace before_filter :oauth_required
with oauthenticate :interactive => false
and it'll work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.