4
4
# ==> Mailer Configuration
5
5
# Configure the e-mail address which will be shown in Devise::Mailer,
6
6
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
7
- config . mailer_sender = "please-change-me-at-config-initializers-devise@example .com"
7
+ config . mailer_sender = "no-reply@kandan .com"
8
8
9
9
# Configure the class responsible to send e-mails.
10
10
# config.mailer = "Devise::Mailer"
35
35
# Configure which authentication keys should be case-insensitive.
36
36
# These keys will be downcased upon creating or modifying a user and when used
37
37
# to authenticate or find a user. Default is :email.
38
- config . case_insensitive_keys = [ :username ]
38
+ config . case_insensitive_keys = [ :email , : username ]
39
39
40
40
# Configure which authentication keys should have whitespace stripped.
41
41
# These keys will have whitespace before and after removed upon creating or
42
42
# modifying a user and when used to authenticate or find a user. Default is :email.
43
- config . strip_whitespace_keys = [ :username ]
43
+ config . strip_whitespace_keys = [ :email , : username ]
44
44
45
45
# Tell if authentication through request.params is enabled. True by default.
46
+ # It can be set to an array that will enable params authentication only for the
47
+ # given strategies, for example, `config.params_authenticatable = [:database]` will
48
+ # enable it only for database (email + password) authentication.
46
49
# config.params_authenticatable = true
47
50
48
51
# Tell if authentication through HTTP Basic Auth is enabled. False by default.
52
+ # It can be set to an array that will enable http authentication only for the
53
+ # given strategies, for example, `config.http_authenticatable = [:token]` will
54
+ # enable it only for token authentication.
49
55
# config.http_authenticatable = false
50
56
51
57
# If http headers should be returned for AJAX requests. True by default.
59
65
# Does not affect registerable.
60
66
# config.paranoid = true
61
67
68
+ # By default Devise will store the user in session. You can skip storage for
69
+ # :http_auth and :token_auth by adding those symbols to the array below.
70
+ # Notice that if you are skipping storage for all authentication paths, you
71
+ # may want to disable generating routes to Devise's sessions controller by
72
+ # passing :skip => :sessions to `devise_for` in your config/routes.rb
73
+ config . skip_session_storage = [ :http_auth ]
74
+
62
75
# ==> Configuration for :database_authenticatable
63
76
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
64
77
# using other encryptors, it sets how many times you want the password re-encrypted.
77
90
# able to access the website for two days without confirming his account,
78
91
# access will be blocked just in the third day. Default is 0.days, meaning
79
92
# the user cannot access the website without confirming his account.
80
- # config.confirm_within = 2.days
93
+ # config.allow_unconfirmed_access_for = 2.days
94
+
95
+ # If true, requires any email changes to be confirmed (exactly the same way as
96
+ # initial account confirmation) to be applied. Requires additional unconfirmed_email
97
+ # db field (see migrations). Until confirmed new email is stored in
98
+ # unconfirmed email column, and copied to email column on successful confirmation.
99
+ config . reconfirmable = true
81
100
82
101
# Defines which key will be used when confirming an account
83
102
# config.confirmation_keys = [ :email ]
86
105
# The time the user will be remembered without asking for credentials again.
87
106
# config.remember_for = 2.weeks
88
107
89
- # If true, a valid remember token can be re-used between multiple browsers.
90
- # config.remember_across_browsers = true
91
-
92
108
# If true, extends the user's remember period when remembered via cookie.
93
109
# config.extend_remember_period = false
94
110
95
111
# Options to be passed to the created cookie. For instance, you can set
96
112
# :secure => true in order to force SSL only cookies.
97
- # config.cookie_options = {}
113
+ # config.rememberable_options = {}
98
114
99
115
# ==> Configuration for :validatable
100
116
# Range for password length. Default is 6..128.
109
125
# The time you want to timeout the user session without activity. After this
110
126
# time the user will be asked for credentials again. Default is 30 minutes.
111
127
# config.timeout_in = 30.minutes
128
+
129
+ # If true, expires auth token on session timeout.
130
+ # config.expire_auth_token_on_timeout = false
112
131
113
132
# ==> Configuration for :lockable
114
133
# Defines which strategy will be used to lock an account.
155
174
# Defines name of the authentication token params key
156
175
# config.token_authentication_key = :auth_token
157
176
158
- # If true, authentication through token does not store user in session and needs
159
- # to be supplied on each request. Useful if you are using the token as API token.
160
- # config.stateless_token = false
161
-
162
177
# ==> Scopes configuration
163
178
# Turn scoped views on. Before rendering "sessions/new", it will first check for
164
179
# "users/sessions/new". It's turned off by default because it's slower if you
169
184
# devise role declared in your routes (usually :user).
170
185
# config.default_scope = :user
171
186
172
- # Configure sign_out behavior.
173
- # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
174
- # The default is true, which means any logout action will sign out all active scopes.
187
+ # Set this configuration to false if you want /users/sign_out to sign out
188
+ # only the current scope. By default, Devise signs out all scopes.
175
189
# config.sign_out_all_scopes = true
176
190
177
191
# ==> Navigation configuration
182
196
# If you have any extra navigational formats, like :iphone or :mobile, you
183
197
# should add them to the navigational formats lists.
184
198
#
185
- # The :"*/*" and "*/*" formats below is required to match Internet
186
- # Explorer requests.
187
- # config.navigational_formats = [:"*/*", "*/*", :html]
199
+ # The "*/*" below is required to match Internet Explorer requests.
200
+ # config.navigational_formats = ["*/*", :html]
188
201
189
202
# The default HTTP method used to sign out a resource. Default is :delete.
190
203
config . sign_out_via = :delete
202
215
# manager.intercept_401 = false
203
216
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
204
217
# end
205
- end
218
+
219
+ # ==> Mountable engine configurations
220
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
221
+ # is mountable, there are some extra configurations to be taken into account.
222
+ # The following options are available, assuming the engine is mounted as:
223
+ #
224
+ # mount MyEngine, at: "/my_engine"
225
+ #
226
+ # The router that invoked `devise_for`, in the example above, would be:
227
+ # config.router_name = :my_engine
228
+ #
229
+ # When using omniauth, Devise cannot automatically set Omniauth path,
230
+ # so you need to do it manually. For the users scope, it would be:
231
+ # config.omniauth_path_prefix = "/my_engine/users/auth"
232
+ end
0 commit comments