This post is pretty old! Opinions and technical information in it
are almost certainly oudated. Commands and configurations will
probably not work. Consider the age of the content before putting
any of it into practice.
if RAILS_ENV == 'development'
session[:url] = params[:url]
store = OpenID::Store::Filesystem.new(RAILS_ROOT + '/tmp')
consumer = OpenID::Consumer.new(session, store)
oid_req = consumer.begin params[:url]
realm = request.protocol + request.host_with_port
return_to = session_url
redirect_to oid_req.redirect_url(realm, return_to)