Tuesday, May 3, 2011

Stackoverflow-like login system in Rails?

What's the best (easy) way to implement a login/authentication system on a Rails web-app that looks and works like the Stackoverflow system?

I realize that it's basicly OpenID, but Stackoverflow handles integration with multiple providers.

Is there a easy way to this on Rails? Or do we have to hack restfull_auth or authlogic to do that?

From stackoverflow
  • Ryan has a decent railscast about this.

  • http://rubyforge.org/projects/ruby-openid/

    This may provide you with a solution. Also look at http://leancode.com/openid-for-rails/ for some resources and recommendations for OpenID on rails.

    This also looks promising, although I haven't seen the documentation. You might want to check it out.

  • Stackoverflow doesn't really do anything special for specific providers. It just takes an OpenId and then transfers the browser to the url processes it.

    You might want to check out this blog entry on integrating OpenId into your rails application:

    http://www.danwebb.net/2007/2/27/the-no-shit-guide-to-supporting-openid-in-your-applications

  • I believe StackOverflow uses the OpenID Selector, which for the visual effect is all HTML and Javascript, so you should be able to easily apply it to your Rails app that already uses a Ruby OpenID library.

    Javier : Does the Ruby OpenID library support account providers like Google and Yahoo (as does OpenID Selector)?
    rubenfonseca : As far as I tested it, it works with all the major openID providers, including google and yahoo!
  • Hi, I've just implemented what you're looking for in an example application:

    http://openid-example.joontos.ch

    (check out the link to the source code)

    rubenfonseca : excellent example! thank you!
    piemesons : @Javier its gone :-(

0 comments:

Post a Comment