https://github.com/faradayio/devise-auth0
Authenticate auth0 users in ruby web apps
https://github.com/faradayio/devise-auth0
Last synced: about 1 year ago
JSON representation
Authenticate auth0 users in ruby web apps
- Host: GitHub
- URL: https://github.com/faradayio/devise-auth0
- Owner: faradayio
- License: mit
- Created: 2014-10-07T01:19:11.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-06-15T17:17:17.000Z (almost 8 years ago)
- Last Synced: 2025-05-30T09:58:10.771Z (about 1 year ago)
- Language: Ruby
- Size: 9.77 KB
- Stars: 32
- Watchers: 9
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE.txt
Awesome Lists containing this project
README
# Devise::Auth0
A devise/warden strategy for authenticating users with an Auth0-issued JSON web
token (JWT). This token is assumed to be provided via the Authorization HTTP
header.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'devise-auth0'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install devise-auth0
## Configuration
In `config/initializers/devise.rb`:
``` ruby
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) do
config.client_id = "abc123"
config.secret = "shhhh"
end
manager.default_strategies(scope: :user).unshift :auth0_authenticatable
end
end
```