Omniauth/Devise/Facebook: Auth route is not recognized

Posted by M. Cypher on Stack Overflow See other posts from Stack Overflow or by M. Cypher
Published on 2011-03-10T16:08:51Z Indexed on 2011/03/10 16:10 UTC
Read the original article Hit count: 346

I've been working on this problem for 7 hours now, and I still have no idea. Maybe one of you can help me.

I'm simply trying to integrate the OAuth feature of Devise 1.2rc, which uses Omniauth, into my Rails application.

  • I've been using this tutorial by Devise:

https://github.com/plataformatec/devise/wiki/OmniAuth%3A-Overview

  • I have done everything they tell you to...

  • Yes, I have added the following line to my devise.rb:

config.omniauth :facebook, "APP ID", "APP SECRET"

  • I have added :omniauthable to my user model, as well as the class function as described in the tutorial

  • I have implemented the omniauth_callbacks controller, as well as the callback function, and I have specified the omniauth_callbacks controller in my routes.rb

  • When I run "rake middleware" it does list the Omniauth middleware:

use OmniAuth::Strategies::Facebook

  • I have installed Devise directly from the Git repo, master branch, so it's up-to-date

  • I have installed Omniauth 1.2.0.beta5, which is the latest version. In my Gemfile it says:

gem 'oa-oauth', '0.2.0.beta5', :require => 'omniauth/oauth'

  • I have restarted the server, obviously

  • However, when I try to request this URL:

http://localhost:3000/auth/facebook

it simply says

ActionController::RoutingError (No route matches "/auth/facebook"):

/user/auth/facebook doesn't work either.

Since I unfortunately don't have the time to take apart the entire Omniauth and Devise gems and understand every line of code in them, maybe one of you could tell me what the problem might be.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3