problems with oauth (omniauth-facebook gem) to work with with declarative authorization.

41 views
Skip to first unread message

j.n

unread,
Jul 7, 2012, 6:36:26 AM7/7/12
to declarative_...@googlegroups.com
Hi all!

I am trying to get declaratice authorization working with oauth, especially to login to my site over facebook. I get an access denied when trying calling the callback funtion that is triggered after entering your login on the facebook site.

I am using a an action 'facbook' in my callback controller like so:

class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def facebook
     .....
   end
end

in the console I get the following output:

Started GET "/users/auth/facebook/callback?code=AQAG5bhZ.....
Processing by Users::OmniauthCallbacksController#facebook as HTML
  Parameters: {"code"=>"AQAG5bhZe9..."}

Permission denied: No matching rules found for facebook for #<Authorization::AnonymousUser:0x007fcd2eabf920 @role_symbols=[:guest]> (roles [:guest], privileges [:facebook], context :users_omniauth_callbacks).

I am relatively new to declarative authorization. Its now clear to me, what the resource is in this case, which I need to put in my authorization_rules file...

Thanks so much for any help.

best,
j.
Reply all
Reply to author
Forward
0 new messages