There's no built-in password reset functionality in MDriven Turnkey. Add this pattern to your model that you can adapt as needed.
If you use the default package for login, the ASPNETIdentity package, this package will extend your model with the following:
- A reset password page that you can create an action to go to. This page should not have any access groups.
- A server-side ViewModel that runs every 20 seconds and sends emails with reset instructions to your users. Remember to set the Turnkey/MDrivenServer's email server settings.
- A page for the user to set the password. This page also has information for the user about expired reset tickets and sending new tickets in those circumstances.
Import this template and then you:
- Set the PasswordReset package's "Default superclass" if you want that.
- Make sure you have an email server set up.
- Create an action that opens the "RestetPasswordPage" ViewModel.
ResetPasswordTicket
Attributes
Methods
SysUser
Methods
GetResetPasswordTicket: ResetPasswordTicket
Triggers the ResetPasswordTicket State Machine to expire any password reset requests are past their expiry time.
This method returns the user's ResetPasswordTicket that has been sent if any is available otherwise creates a new ResetPasswordTicket
HashPassword: String
Arg: pwd - password to hash
This is used to hash a user's password
SetPassword
Arg: pwd - new password to set
This is used to set a new PasswordHash for a user using the HashPassword method.
Download the model file here: Model_Examples