-
-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RoutingError issue in production env only, when getting /auth/any_provider #244
Comments
Try this in your routes:
And in your controller:
Does that fix it? |
Hi Michael, thx for your answer, Maybe it would be a good idea to have another way to trigger the process (eg in a controller action). thx again. |
OmniAuth is just a middleware, so if your middleware stack is working correctly it should work. That being said, I've never actually tried OmniAuth with Rails 2.3.x, so it may have some issues I'm unaware of. |
Thanks for your response Michael, [Rack::Lock, ActionController::Failsafe, Devise::CookieSanitizer, ActionController::Session::CookieStore, #, Rails::Rack::Metal, ActionController::ParamsParser, Rack::MethodOverride, Rack::Head, ActionController::StringCoercion, OmniAuth::Builder, Warden::Manager, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache] How can I test my Middleware stack ? |
I apologize for this, but for now I'm making the official line that OmniAuth doesn't support Rails 2.3.x. If you manage to get it working I'd love to post how on the wiki, but I don't have the resources to allocate to specifically solving problems for old versions of Rails. Thanks. |
OmniAuth supports rails 2.3.x, you need to add a blank action to routes.rb and controller: map.failure "/auth/failure", :controller => "third_party_auth", :action => "failure"
map.callback "/auth/:provider", :controller => "third_party_auth", :action => "blank"
map.callback "/auth/:provider/callback", :controller => "third_party_auth", :action => "create" def blank
render :text => "Not Found", :status => 404
end |
@quake : As I mentionned it, this workaround don't fix my issue. I understand, that rails 2.3.x cannot be officially supported, but sometimes it works.... For the record : Work on : AWS-EC2 (Ubuntu : Linux 2.6.32-312-ec2 Ubuntu 4.4.3-4ubuntu5) + Apache2 + Passenger + Rails 2.3.11 + Omniauth 0.2 |
I had the same problem. The culprit is FastCGI. The real issue was that fastcgi doesn't create the PATH_INFO environment variable that Rack applications rely on. The fix is here: http://stackoverflow.com/a/15504313/583346. |
Hi, I'm using rails 2.3.11 & ruby 1.8.7 versions. I couldn't run the server after the omni_auth.rb file included in the initializers folder. Im getting ""load_missing_constant': uninitialized constant ActionController::Dispatcher (NameError) " Please help me out. |
@PoornimaD Sorry, but, OmniAuth does not support Rails 2.3.x. |
I there,
Trying to setup (Running Rails 2.3.11 and Ruby 1.8.7, Omniauth v0.1.6 & tested with 0.2.0 too) this shining gem (thank a lot for your work), I had a new issue after deploying.
The environment initializers are almost defaults one. I had exception rescue strategy, but I disabled it.
My issue is quite simple :
when calling
/auth/any_provider
a RoutingError is raised (it is quite normal as I understand it), but omniauth is not triggered and no redirection shown then the 404 page is rendered.I don't understand what happen (and what it should happen).
Last but not least it works fine in my development environment with production initializer.
I wonder if my production server could be responsible (Apache + FCGI) ?!
The text was updated successfully, but these errors were encountered: