omniauth routing error help

13 views
Skip to first unread message

dasibre

unread,
Dec 11, 2012, 9:28:39 PM12/11/12
to rubyonra...@googlegroups.com
I'm trying to setup omniauth for my application. I'm able to get to twitter but i get a No route matches {:controller=>"sessions", :action=>"auth_callback"}
on the callback. When i run rake routes it shows that the route exists.
ROUTES FILE
  match'auth/:provider/callback' => 'sessions#auth_callback', :as => :auth_callback
  match 'logout', :to => 'sessions#destroy'

RAKE ROUTES OUTPUT
auth_callback /auth/:provider/callback(.:format) sessions#auth_callback logout /logout(.:format) sessions#destroy


Sessions auth_callback controller method
def auth_callback auth = request.env["omniauth.auth"] user = Moviegoer.find_by_provider_and_uid(auth["provider"], auth["uid"]) || Moviegoer.create_with_omniauth(auth) session[:user_id] = user.id redirect_to movies_path end

Reply all
Reply to author
Forward
0 new messages