I went through quite a lot of Rails/Rails examples of Google OpenID authentication, but none of them worked properly. Most of them don't work because they are out of date. Even omniauth doesn't for some other reason.
Does anyone have a working example of Ruby Rack web application which works properly now?
I forked one a while back and popped it up on GitHub called rails3-mongoid-omniauth.
It lets you authenticate using a variety of methods. It provably runs on the Bamboo stack on Heroku with Rails 3.0.x. I haven't updated it, but it should give you some insights.
Some of the key files are:
Now that I have done some more research, it looks like there is also a tutorial at http://railsapps.github.com/tutorial-rails-mongoid-omniauth.html.