@@ -27,7 +27,6 @@ Rails.application.config.sorcery.configure do |config| | |||||
# | # | ||||
# config.cookie_domain = | # config.cookie_domain = | ||||
# -- session timeout -- | # -- session timeout -- | ||||
# How long in seconds to keep the session alive. | # How long in seconds to keep the session alive. | ||||
# Default: `3600` | # Default: `3600` | ||||
@@ -283,17 +282,8 @@ Rails.application.config.sorcery.configure do |config| | |||||
# manually handle how and when email is sent | # manually handle how and when email is sent | ||||
# Default: `false` | # Default: `false` | ||||
# | # | ||||
# user.reset_password_mailer_disabled = | |||||
# reset password email | |||||
# method on your mailer | |||||
# class. | |||||
# Default: `:reset_password_email` | |||||
# | |||||
# user.reset_password_email_method_name = | |||||
# how many seconds before the reset request expires. nil for never expires. | # how many seconds before the reset request expires. nil for never expires. | ||||
# Default: `nil` | # Default: `nil` | ||||
# | # | ||||
@@ -399,6 +389,17 @@ Rails.application.config.sorcery.configure do |config| | |||||
# Default: `:uid` | # Default: `:uid` | ||||
# | # | ||||
# user.provider_uid_attribute_name = | # user.provider_uid_attribute_name = | ||||
# -- remember_me -- | |||||
# allow the remember_me cookie to settable through AJAX | |||||
# Default: `true` | |||||
# | |||||
# user.remember_me_httponly = | |||||
# How long in seconds the session length will be | |||||
# Default: `604800` | |||||
# | |||||
user.remember_me_for = 60 * 60 * 24 * 7 # 1 week | |||||
end | end | ||||
# This line must come after the 'user config' block. | # This line must come after the 'user config' block. | ||||
@@ -0,0 +1,15 @@ | |||||
class AddRememberMeTokenToUsers < ActiveRecord::Migration | |||||
def self.up | |||||
add_column :users, :remember_me_token, :string, :default => nil | |||||
add_column :users, :remember_me_token_expires_at, :datetime, :default => nil | |||||
add_index :users, :remember_me_token | |||||
end | |||||
def self.down | |||||
remove_index :users, :remember_me_token | |||||
remove_column :users, :remember_me_token_expires_at | |||||
remove_column :users, :remember_me_token | |||||
end | |||||
end |
@@ -11,7 +11,7 @@ | |||||
# | # | ||||
# It's strongly recommended to check this file into your version control system. | # It's strongly recommended to check this file into your version control system. | ||||
ActiveRecord::Schema.define(:version => 20130228150425) do | |||||
ActiveRecord::Schema.define(:version => 20130320181527) do | |||||
create_table "feeds", :force => true do |t| | create_table "feeds", :force => true do |t| | ||||
t.string "title" | t.string "title" | ||||
@@ -56,8 +56,12 @@ ActiveRecord::Schema.define(:version => 20130228150425) do | |||||
t.string "email" | t.string "email" | ||||
t.string "crypted_password" | t.string "crypted_password" | ||||
t.string "salt" | t.string "salt" | ||||
t.datetime "created_at", :null => false | |||||
t.datetime "updated_at", :null => false | |||||
t.datetime "created_at", :null => false | |||||
t.datetime "updated_at", :null => false | |||||
t.string "remember_me_token" | |||||
t.datetime "remember_me_token_expires_at" | |||||
end | end | ||||
add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token" | |||||
end | end |