Omniauth and Other Drugs

First of all I'd like to apologize for my extended absence these last few months. I have been extremely busy revamping three old rails apps, one of which was using rails ~1.2.

Anyways, that's not what I want to talk about today. Today is all about Omniauth. I originally chalked Omniauth up as yet another flavor of the week authentication mechanism. Boy was I wrong. Omniauth is an authentication framework that allows you to incorporate standardized 'Strategies' quickly in your applications. It's a Rack middleware so including it into Rails/Sinatra/whatever is incredibly easy and even fun. Here I'm going to show you a trick that our team used to create a default provider login in a rails application using Omniauth's #onfailedregistration hook.

Surprise Code!