Boy van Amstel

Technology, programming and 80's hits.

Omniauth Strategy for Google OpenID+OAuth Hybrid Protocol Login

Quite the title and quite cool to use. The Hybrid Protocol combines OpenID and OAuth in such a way that with one flow you can ask for authentication (and get someones account information, like name and email) and authorization (a token) for a set of services specified in a scope.

Apart from providing a much cleaner user experience, it’ll save you a bunch of code. Especially via Omniauth.

I’ve created a fork (read update) that contains the google_hybrid strategy and an example project that implements it.

UPDATE: My strategy just got merged into Omniauth’s master branch. So just use Omniauth instead of my fork.

To see how it works, try this demo.

Like what you're reading, want to give me feedback or share your views? Let me know on Twitter.