Enable lockable feature of Devise to lock out users after brute force attempts
This commit is contained in:
parent
35eb83448e
commit
9853af43de
2 changed files with 7 additions and 4 deletions
|
|
@ -25,10 +25,10 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
||||||
# t.datetime :confirmation_sent_at
|
# t.datetime :confirmation_sent_at
|
||||||
# t.string :unconfirmed_email # Only if using reconfirmable
|
# t.string :unconfirmed_email # Only if using reconfirmable
|
||||||
|
|
||||||
## Lockable
|
# Lockable
|
||||||
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
|
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.string :unlock_token # Only if unlock strategy is :email or :both
|
||||||
# t.datetime :locked_at
|
t.datetime :locked_at
|
||||||
|
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,9 @@ ActiveRecord::Schema.define(version: 20150715145517) do
|
||||||
t.datetime "last_sign_in_at"
|
t.datetime "last_sign_in_at"
|
||||||
t.inet "current_sign_in_ip"
|
t.inet "current_sign_in_ip"
|
||||||
t.inet "last_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 "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue