README.md in quo_vadis-2.0.2 vs README.md in quo_vadis-2.1.0

- old
+ new

@@ -84,13 +84,13 @@ validates :username, uniqueness: {case_sensitive: false} authenticates identifier: :username end ``` -When __creating__ a model instance, include a `:password` attribute and, optionally, `:password_confirmation` attribute. +You can create and update your models as before. When you want to set a password for the first time, just include `:password` and, optionally, `:password_confirmation` in the attributes to `#create` or `#update`. -When __updating__ a model instance, do not include a `:password` attribute. To change someone's password, use the Change Password feature (see below). +If you want to change an existing password, use the Change Password feature (see below). If you update a model (that already has a password) with a `:password` attribute, it will raise a `QuoVadis::PasswordExistsError`. The minimum password length is configured by `QuoVadis.password_minimum_length` (12 by default). ### Controllers @@ -254,10 +254,12 @@ On that page you can show the user the address the email was sent to, enable them to update their email address if they make a mistake on the sign-up form, and provide a button to resend another email directly. If the sign-up occurred in a different browser session, you can instead link to `new_confirmation_path` where the user can request another email if need be. Next, write the page to which the link in the email points ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/confirmations/edit.html.erb)). It must be in `app/views/quo_vadis/confirmations/edit.html.:format`. +Next, write the page where the user can amend their email address if they made a mistake when signing up ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/confirmations/edit_email.html.erb)). It must be in `app/views/quo_vadis/confirmations/edit_email.html.:format`. + Finally, write the page where people can put in their identifier (not their email, unless the identifier is email) again to request another confirmation email ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/confirmations/new.html.erb)). It must be in `app/views/quo_vadis/confirmations/new.html.:format`. After the user has confirmed their account, they will be logged in and redirected to the first of these that exists: - a route named `:after_login`; @@ -351,14 +353,14 @@ Now write the page to where the user is redirected while they wait for the email ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/password_resets/index.html.erb)). It must be in `app/views/quo_vadis/password_resets/index.html.:format`. It's a good idea for that page to link to `new_password_reset_path` where the user can request another email if need be. +Now write the email view ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/mailer/reset_password.text.erb)). It must be in `app/views/quo_vadis/mailer/reset_password.{text,html}.erb` and output the `@url` variable. + Next, write the page to which the link in the email points ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/password_resets/edit.html.erb)). It must be in `app/views/quo_vadis/password_resets/edit.html.:format`. -Finally, write the page where people can put in their identifier (not their email, unless the identifier is email) again to request another password-reset email ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/password_resets/new.html.erb)). It must be in `app/views/quo_vadis/password_resets/new.html.:format`. - After the user has reset their password, they will be logged in and redirected to the first of these that exists: - a route named `:after_login`; - your root route. @@ -403,11 +405,11 @@ ```ruby QuoVadis.configure do password_minimum_length 12 mask_ips false - cookie_name '__Host-qv' + cookie_name (Rails.env.production? ? '__Host-qv' : 'qv') session_lifetime :session session_lifetime_extend_to_end_of_day false session_idle_timeout :lifetime password_reset_token_lifetime 10.minutes accounts_require_confirmation false @@ -434,10 +436,10 @@ Masking means setting the last octet (IPv4) or the last 80 bits (IPv6) to 0. __`cookie_name`__ (string) -The name of the cookie QuoVadis uses to store the session identifier. The `__Host-` prefix is [recommended](https://developer.mozilla.org/en-US/docs/Web/API/document/cookie). +The name of the cookie QuoVadis uses to store the session identifier. The `__Host-` prefix is [recommended](https://developer.mozilla.org/en-US/docs/Web/API/document/cookie) in an SSL environment (but cannot be used in a non-SSL environment). __`session_lifetime`__ (`:session` | `ActiveSupport::Duration` | integer) The lifetime of a logged-in session. Use `:session` for the browser session, or a `Duration` or number of seconds.