M. Cypher
M. Cypher

Reputation: 7066

Omniauth/Devise/Facebook: Auth route is not recognized

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.

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

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

use OmniAuth::Strategies::Facebook

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

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.

Upvotes: 2

Views: 3152

Answers (2)

jstnno
jstnno

Reputation: 1045

After some hours trying to fix this issue I realized that i'd config/initializers/omniauth.rb in the .gitignore file (shame on me).

so remove omniauth.rb from the .gitignore list if you haven't already

Upvotes: 2

M. Cypher
M. Cypher

Reputation: 7066

Problem is solved now. Apparently it was a problem with Devise. I posted it as an issue on their Github and they fixed it in their source. In the latest Devise master branch it now works.

Upvotes: 2

Related Questions