Enable lockable feature of Devise to lock out users after brute force attempts

This commit is contained in:
Christoph Haas 2015-07-15 17:30:47 +02:00
parent 35eb83448e
commit 9853af43de
2 changed files with 7 additions and 4 deletions

View file

@ -25,10 +25,10 @@ class DeviseCreateUsers < ActiveRecord::Migration
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
# Lockable
t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
t.string :unlock_token # Only if unlock strategy is :email or :both
t.datetime :locked_at
t.timestamps

View file

@ -75,6 +75,9 @@ ActiveRecord::Schema.define(version: 20150715145517) do
t.datetime "last_sign_in_at"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.integer "failed_attempts", default: 0, null: false
t.string "unlock_token"
t.datetime "locked_at"
t.datetime "created_at"
t.datetime "updated_at"
end