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
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/Ojmxa6NWAjMJ.
For more options, visit https://groups.google.com/groups/opt_out.