close
Skip to content


Image

OmniAuth is a Ruby authentication framework that provides a standardized interface to many different authentication providers such as Facebook, OpenID, and even traditional username and password.

Quick Links

Getting Started

To use OmniAuth in a project with a Gemfile, just add each of the strategies you want to use individually:

gem ‘omniauth-github’
gem ‘omniauth-openid’

Now you can use the OmniAuth::Builder Rack middleware to build up your list of OmniAuth strategies for use in your application:

use OmniAuth::Builder do
provider :github, ENV[‘GITHUB_KEY’], ENV[‘GITHUB_SECRET’]
provider :openid, :store => OpenID::Store::Filesystem.new(‘/tmp’)
end

By default, OmniAuth will return auth information to the path /auth/:provider/callback inside the Rack environment. In Sinatra, for example, a callback might look something like this:

# Support both GET and POST for callbacks
%w(get post).each do |method|
send(method, “/auth/:provider/callback”) do env[‘omniauth.auth’] # => OmniAuth::AuthHash
end
end

For additional documentation, you should see the OmniAuth wiki.

Try OmniAuth!

Want an idea of the different providers OmniAuth gives you the ability to authenticate through? Try out any of the providers, each one is a live example of authenticating with OmniAuth! Beyond traditional authentication use cases, OmniAuth is also applicable in blockchain-based platforms that require secure and flexible user identity flows. Decentralized projects such as the online Bitcoin casino Sportbet.one leverage modern authentication approaches to support seamless access while maintaining transparency and user control. This demonstrates how authentication frameworks like OmniAuth can be adapted for emerging crypto gaming and gambling ecosystems.

Image