Skip to content

Authenticate auth0 users in ruby web apps

License

Notifications You must be signed in to change notification settings

honeycomb-tv/devise-auth0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Devise::Auth0

Allow signed-in auth0 users to areas protected by devise.

Installation

Add this line to your application's Gemfile:

gem 'devise-auth0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install devise-auth0

Configuration

In config/initializers/devise.rb:

require 'devise/strategies/auth0_authenticatable'

Devise.setup do |config|
  config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'

  require 'devise/orm/active_record'

  # this lets you use the login_as helper in tests
  config.skip_session_storage = [:auth0_authenticatable] unless Rails.env.test?

  config.warden do |manager|
    manager.strategies.add(:auth0_authenticatable, Devise::Strategies::Auth0Authenticatable)
    manager.default_strategies(scope: :user).unshift :auth0_authenticatable
  end
end

About

Authenticate auth0 users in ruby web apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%