Skip to content
Devise based authorization for AlchemyCMS
Branch: master
Clone or download
tvdeyen v4.2.1
- Remove test files from built Ruby gem [#82](#82) ([tvdeyen](
- Run CSRF protection before all other controller filters [#81](#81) ([tvdeyen](
Latest commit 4fe8f82 May 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis.yml v4.2.1 May 15, 2019
LICENSE v4.2.0 Apr 1, 2019

Devise based authentication for AlchemyCMS 4.2

Build Status

Gem Version Test Coverage Code Climate security

AlchemyCMS has no authentication in its core. So it is possibly to bring your own authentication and use it to authorize users in AlchemyCMS. If you don't have your own authentication, you can use this gem.


Just put the gem into your projects Gemfile.

# Gemfile
gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '4.2-stable'

and run bundle install.

Then run the installer:

$ bin/rails g alchemy:devise:install


After updating the gem, please run the installer again.

$ bundle update alchemy-devise
$ bin/rails g alchemy:devise:install

Devise modules

Default Devise modules included in Alchemy::User model

  • :database_authenticatable
  • :trackable
  • :validatable
  • :timeoutable
  • :recoverable

If you want to add additional modules into the Alchemy user class append them to Alchemy.devise_modules in an initializer in your app.

Register additional modules example

# config/initializers/alchemy.rb
Alchemy.devise_modules << :registerable

Using old encryption

If your app uses an old encryption that needs the +devise-encryptable+ gem you also need to load the devise module.

# config/initializers/alchemy.rb
Alchemy.devise_modules << :encryptable


If you want to contribute (and you should ^_^), you need to run the tests locally on your machine.

Just follow these pretty rails standard way of testing projects:

1. Once to prepare the test suite:

Clone the repo to your local harddrive. Then

$ bundle install
$ rake alchemy:spec:prepare

2. Run the tests with:

$ rspec

Optional: Even shorter

$ rake

That prepares the database and runs the Rspec task in one step.

Getting Help



You can’t perform that action at this time.