Question

Hi I am following Railcasts: #241 Simple Omniauth tutorial so I can let users log in to my sample application using the omniauth-twitter gem, however I am getting a routing error when entering the /auth/twitter stage of tutorial.

What I have added after a few online searches :strategy_class => OmniAuth::Strategies::Twitter to my omniauth.rb file. However I get the same problem, but now when I run rake route I get the following routes:

              /auth/:provider/callback(.:format) sessions#create

auth_failure /auth/failure(.:format) :controller#:action

which I guess mean that it is now contacting the omniauth-twitter gem but i still can't get /auth/twitter to work.

What I think I need to do: I think I need to get the following to show in my rake routes. omniauth_authorize GET|POST /auth/:provider(.:format) /omniauth_callbacks

Any help would be greatly appreciated. Thank you in advance

Mark.

Was it helpful?

Solution

For anyone who has a similar problem, I had an addition space at the end of my omniauth.rb file ( i.e. omniauth.rb(space) ) so Rails didn't recognise it. Very difficult to see but it works perfectly now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top