Auth1

Auth1 provides everything you need to use Auth0 in your Rails application.

Usage

How to use my plugin.

Installation

Add this line to your application's Gemfile:

gem 'auth1'

And then execute:

$ bundle

Set the following environment variables with the values from Auth0 Application Settings:

AUTH0_CLIENT_ID
AUTH0_CLIENT_SECRET
AUTH0_DOMAIN

Update Allowed Callback URLs field in Auth0 Application Settings. For local development, you can set this value to http://localhost:3000/auth/auth0/callback.

View Helpers

<% if user_signed_in? -%>
  <%= logout_button %>
<% else -%>
  <%= login_button %>
<% end -%>

# or just
<%= login_or_logout_button %>

Contributing

Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.