Documentation for Reset Password Feature¶ ↑
The reset password feature implements password resets. If the user enters an invalid password, they will be displayed a form where they can request a password reset. Submitting that form will send an email containing a link, and that link will taken them to a password reset form. Depends on the login feature.
Auth Value Methods¶ ↑
- no_matching_reset_password_key_error_flash
-
The flash error message to show if attempting to access the reset password form with an invalid key.
- reset_password_additional_form_tags
-
HTML fragment containing additional form tags to use on the reset password form.
- reset_password_autologin?
-
Whether to autologin the user after successfully resetting a password, false by default.
- reset_password_button
-
The text to use for the reset password button.
- reset_password_deadline_column
-
The column name in the
reset_password_table
storing the deadline after which the token will be ignored. - reset_password_deadline_interval
-
The amount of time for which to allow users to reset their passwords, 1 day by default. Only used if
set_deadline_values?
is true. - reset_password_email_last_sent_column
-
The email last sent column in the
reset_password_table
. Set to nil to always send a reset password request email when requested. - reset_password_email_recently_sent_error_flash
-
The flash error to show if not sending reset password request email because one has been sent recently.
- reset_password_email_recently_sent_redirect
-
Where to redirect if not sending reset password request email because one has been sent recently.
- reset_password_email_sent_notice_flash
-
The flash notice to show after a reset password request email has been sent.
- reset_password_email_sent_redirect
-
Where to redirect after sending a reset password request email.
- reset_password_email_subject
-
The subject to use for the reset password request email.
- reset_password_error_flash
-
The flash error to show after resetting a password.
- reset_password_explanatory_text
-
The text to display above the button to request a password reset.
- reset_password_id_column
-
The id column in the
reset_password_table
, should be a foreign key referencing the accounts table. - reset_password_key_column
-
The reset password key/token column in the
reset_password_table
. - reset_password_key_param
-
The parameter name to use for the reset password key.
- reset_password_notice_flash
-
The flash notice to show after resetting a password.
- reset_password_page_title
-
The page title to use on the reset password form.
- reset_password_redirect
-
Where to redirect after resetting a password.
- reset_password_request_additional_form_tags
-
HTML fragment containing additional form tags to use on the reset password request form.
- reset_password_request_button
-
The text to use for the reset password request button.
- reset_password_request_error_flash
-
The flash error to show if not able to send a reset password request email.
- reset_password_request_link_text
-
The text to use for a link to the page to request a password reset.
- reset_password_request_page_title
-
The page title to use on the reset password request form.
- reset_password_request_route
-
The route to the reset password request action. Defaults to
reset-password-request
. - reset_password_route
-
The route to the reset password action. Defaults to
reset-password
. - reset_password_session_key
-
The key in the session to hold the reset password key temporarily.
- reset_password_skip_resend_email_within
-
The number of seconds before sending another reset password request email, if
reset_password_email_last_sent_column
is set. - reset_password_table
-
The name of the reset password keys table.
Auth Methods¶ ↑
- account_from_reset_password_key(key)
-
Retrieve the account using the given reset password key, or return nil if no account matches.
- after_reset_password
-
Run arbitrary code after successfully resetting a password.
- after_reset_password_request
-
Run arbitrary code after sending the reset password request email.
- before_reset_password
-
Run arbitrary code before resetting a password.
- before_reset_password_request
-
Run arbitrary code before sending the reset password request email.
- before_reset_password_request_route
-
Run arbitrary code before handling a reset password request route.
- before_reset_password_route
-
Run arbitrary code before handling a reset password route.
- create_reset_password_email
-
A Mail::Message for the reset password request email.
- create_reset_password_key
-
Add the reset password key data to the database.
- get_reset_password_email_last_sent
-
Get the last time a reset password request email is sent, or nil if there is no last sent time.
- get_reset_password_key(id)
-
Get the password reset key for the given account id from the database.
- login_failed_reset_password_request_form
-
The HTML to use for a form to request a password reset, shown on the login page after the user tries to login with an invalid password.
- remove_reset_password_key
-
Remove the reset password key for the current account, run after successful password reset.
- reset_password_email_body
-
The body to use for the reset password request email.
- reset_password_email_link
-
The link to the reset password form in the reset password request email.
- reset_password_email_sent_response
-
Return a response after successfully sending a password reset email. By default, redirects to
reset_password_email_sent_redirect
. - reset_password_key_insert_hash
-
The hash to insert into the
reset_password_table
. - reset_password_key_value
-
The reset password key for the current account.
- reset_password_request_view
-
The HTML to use for the reset password request form.
- reset_password_response
-
Return a response after successfully resetting a password. By default, redirects to
reset_password_redirect
. - reset_password_view
-
The HTML to use for the reset password form.
- send_reset_password_email
-
Send the reset password request email.
- set_reset_password_email_last_sent
-
Set the last time a reset password request email is sent.