Drop this in your app, and client apps can easily use omniauth with oauth2 to use it as a source for authentication
Tim Galeckas
gem "oauth2_provider_engine", "~> 0.0.1"