Coherence.PasswordService (Coherence v0.8.0)

This service handles reseting of passwords.

Installed with the --recoverable installation option, this service handles the creation of the reset_password_token. With this installation option, the following fields are added to the user's schema:

  • :reset_password_token - A random string token generated and sent to the user
  • :reset_password_sent_at - the date and time the token was created

The following configuration can be used to customize the behavior of the recoverable option:

  • :reset_token_expire_days (2) - the expiry time of the reset token in days.

Summary

Functions

Create and save a reset password token.

Functions

Link to this function

reset_password_token(user)

Create and save a reset password token.

Creates a random password reset token and saves the token in the user schema along with setting the reset_password_sent_at to the current time and date.