All Projects → TrestleAdmin → trestle-auth

TrestleAdmin / trestle-auth

Licence: LGPL-3.0 license
Authentication plugin for the Trestle admin framework

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Trestle Authentication (trestle-auth)

RubyGem Travis Coveralls

Authentication plugin for the Trestle admin framework

Getting Started

These instructions assume you have a working Trestle application. See the Getting Started section in the Trestle README.

To integrate trestle-auth, first add it to your application's Gemfile, and then run bundle install:

gem 'trestle-auth'

As of version 0.4.0, trestle-auth now supports multiple authentication backends including Devise/Warden.

Option 1: Built-in Integration

Run the install generator to add the configuration to config/initializers/trestle.rb, and generate a User model and admin resource.

$ rails generate trestle:auth:install User

(if no user model name is specified it will default to Administrator)

Then run your migrations with rake db:migrate and create an initial admin user from within rails console:

User.create(email: "[email protected]", password: "password", first_name: "Admin", last_name: "User")

After restarting your Rails server, any attempt to access a page within your admin will redirect you to the login page.

Option 2: Devise Integration

If you already have an existing user model and Devise integration, you can configure trestle-auth to use that instead.

$ rails generate trestle:auth:install User --devise

Replace User with the name of your Devise user model. If not specified, it will default to Administrator.

Configuration

After running the trestle:auth:install generator, check your config/initializers/trestle.rb for further configuration options.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].