Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6148251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:14:51+00:00 2026-05-23T19:14:51+00:00

I am trying to use an OmniAuth (0.2.6) strategy for my application. The architecture

  • 0

I am trying to use an OmniAuth (0.2.6) strategy for my application. The architecture is Rails 2.3.10 and Rack is version is 1.1 (this version or higher is required for OmniAuth). A problem that occurs is Rails doesn’t recognize my redirect to “/auth/provider”. The actual error message is “No route matches “/auth/casport”. Even though that error gets thrown, the code seems to execute past that point up to this error: “request.env[‘omniauth.auth’]”, which I’m pretty sure means it doesn’t recognize the “omniauth.auth” key for the env hash. I have a feeling that OmniAuth isn’t being loaded properly. I’ve tested the same strategy and code base with Mongrel and Webrick, and I get identical error messages.

Here is my OmniAuth initializer (config/initializers/omniauth.rb):

ActionController::Dispatcher.middleware.use OmniAuth::Builder do
  provider :casport, :setup => true
end

I definitely have routes in places for auth/casport/setup and auth/casport/callback.

I’ve also tried this approach: How do you implement OmniAuth on Rails 2.2?

config.middleware.use OmniAuth::Builder do
  provider :casport, :setup => true
end

by placing that middleware code in the config/environments/development.rb file.

Does anyone have any thoughts on what I could be doing incorrectly? Thanks!

Edit: I’ve also tried this approach Has anyone used omniauth with rails 2.3.8?

ActionController::Dispatcher.middleware.use OmniAuth::Strategies::Casport = {
  :setup => true
}

and that returns a read error: “NoMethodError: undefined method ‘new’ for #Hash…

Edit 2: I’ve upgraded to Rails 2.3.10 as OmniAuth isn’t compatible with Rails 2.3.4.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:14:52+00:00Added an answer on May 23, 2026 at 7:14 pm

    I created an issue on OmniAuth’s Github page https://github.com/intridea/omniauth/issues/397, with the above details and this is the response from Michael Bleigh, the creator of OmniAuth:

    “OmniAuth has never officially supported Rails 2.3.x — I’ve heard that some people have had luck with it but it’s not something that is guaranteed. Sorry!”

    So it looks like the methods I posted above may work for some folks. To guarantee correct operation, Rails 3 is needed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to use omniauth in my rails application. I was just curious,
I'm trying to get offline access token (refresh_token) with omniauth google-oauth2 strategy. This is
I am trying to use this railscast episode to provide authentication via twitter http://railscasts.com/episodes/235-omniauth-part-1
I am new to Rails and I am trying to use omniauth with rails
I am trying use gem tire to search in my application. I have tables
I am need paint my image. I'm trying use JQuery in here this link:
Trying to use this sql statement. The first 2 parts work fine, I am
I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
I'm trying to use OmniAuth in a sinatra app with google as the login
I am trying to set the fb app id (used by omniauth) so that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.