How to configure password reminder & reset

The member registration site requires a reminder function to reissue the password when a user forgets the registered password.
The user can change the password by himself/herself from the URL of the password change page included in the email.
It also requires a function that the user can change his/her password by himself/herself.
This tutorial explains how to create an endpoint that performs password reminders and password resets.

Configure password reminder

If a user forgets their password, it can send a reminder email to reissue their password.

1. Create an endpoint for password reminder
Let's create an endpoint for the password reminder.
Select API you want to use and click [Configure Endpoint].

Image (fetched from Gyazo)

This time, we create an endpoint as follows: Image (fetched from Gyazo)

ItemSettings
Pathrepass
Enabled/DisabledEnabled
ModelCategoryAuthentication
ModelLogin
Operationreminder
password_reset_page_url/repass

After completing the above, click [Add]. Image (fetched from Gyazo)

2. Send a password reminder E-mail
Next, let's check created endpoint using the SwaggerUI interface. Click [Swagger UI] on the API list page. Image (fetched from Gyazo)

Click the endpoint you have just created. Image (fetched from Gyazo)

Click [Try it out] Image (fetched from Gyazo)

In the text area, enter the e-mail address which is registered on the site and click [Execute]. Image (fetched from Gyazo)

You can see that you are receiving response code 200.
Image (fetched from Gyazo)

You can see that the E-mail is also sent.
Image (fetched from Gyazo)
You will need a temporary password and token(after "?token=" in the URL) later for password reset so copy and save it.

If you enter an e-mail address that is not registered, you will get an error. Image (fetched from Gyazo)

3. Reset password
Next, let's reset the password according to the sent email. Modify the request body of the same Swagger UI page as follows:

{
    "token": "*****",
    "temp_pwd": "*****",
    "login_pwd": "*****"
}
itemvalue
tokenToken which you can find in your email
(the string after "?token=")
temp_pwdtemporary password which you can find in your email
login_pwdnew password

Click [Execute].
Image (fetched from Gyazo)

You can see that you are receiving response code 200.
Image (fetched from Gyazo)

Configuration of password reminder, confirmation on Swagger UI page, and password reset are now complete.

Configuration of a password reset

It is used when the user resets the password.

1. Create an endpoint for password reset
Let's create an endpoint for a password reset. Select API you want to use and click [Configure Endpoint].
Image (fetched from Gyazo)

This time, we create an endpoint as follows:
Image (fetched from Gyazo)

ItemSetting
Pathpassword_reset
Enabled/DisabledEnabled
ModelCategoryAuthentication
ModelLogin
Operationreset_password

After completing the above, click [Add].
Image (fetched from Gyazo)

2. Reset password
Next, let's reset the password using the endpoint which you just created. This time, we use Swagger UI.
Click [Swagger UI] on the API list page. Image (fetched from Gyazo)

Click the endpoint you have just created. Image (fetched from Gyazo)

Click [Try it out] Image (fetched from Gyazo)

Enter below in the text area.

ItemValue
login_iduser's E-mail address
current_passwordcurrent password
new_passwordnew password

Click [Execute]. Image (fetched from Gyazo)

You can see that you are receiving response code 200.
Image (fetched from Gyazo)

If you enter an E-mail address that is not registered, an error is displayed.
Image (fetched from Gyazo)

Configuration of password reset and confirmation on the Swagger UI page are now complete.