# Password recovery {% if product_name == "WSO2 Identity Server" and is_version == "7.0.0" %} You may enable self-service password recovery for users so that they may reset their forgotten passwords right from the login page. Once enabled, users can click the `Forgot password?` option and receive a password reset link to their registered emails. To do so, 1. On the {{product_name}} Console, go to **Login & Registration**. 2. Under **Account Recovery**, click on **Password Recovery**. 3. Toggle the switch on to enable password recovery. 4. Configure the following options:
Notify on Successful Recovery When checked, the user will be notified via email after a successful password recovery.
Recovery Link Expiry Time Time in minutes until the password recovery link expires.
5. Click **Update** to save the changes. ![Password Recovery Configuration]({{base_path}}/assets/img/guides/account-configurations/password-recovery.png){: width="800" style="display: block; margin: 0;"} {% else %} {% if product_name == "WSO2 Identity Platform" %} !!!note For organizations created after 08th March 2026, use the new flow-based password recovery experience. Refer to [Password Recovery]({{base_path}}/guides/flows/password-recovery/) for more details. {% endif %} {% if product_name == "WSO2 Identity Platform" or (product_name == "WSO2 Identity Server" and is_version > "7.1.0" ) %} You may enable self-service password recovery for users so that they may reset their forgotten passwords right from the login page. Users can click the `Forgot password?` option and choose to receive either a Link or an OTP via Email or SMS to reset the password. To configure password recovery options, 1. On the {{product_name}} Console, go to **Login & Registration**. 2. Under **Account Recovery**, click on **Password Recovery**. 4. Select both **Email** and **SMS OTP** or one of the options to enable them for your organization. ![Password Recovery Configuration]({{base_path}}/assets/img/guides/organization/account-recovery/password-recovery/configure-password-recovery.png){: width="800" style="display: block; margin: 0;"} 5. Configure the corresponding settings.

Email Link/OTP

Notify on successful recovery Specifies whether to notify the user via an email when password recovery is successful.
Recovery link expiry time Specifies the duration (in minutes) after which the email link/OTP will expire.

SMS OTP

Password recovery OTP expiry time Specifies the duration (in minutes) after which the OTP code sent through SMS will expire.
{% elif product_name == "WSO2 Identity Platform" or (product_name == "WSO2 Identity Server" and is_version == "7.1.0" ) %} You may enable self-service password recovery for users so that they may reset their forgotten passwords right from the login page. Users can click the `Forgot password?` option and either receive an email or a mobile OTP to reset the password. To do so, 1. On the {{product_name}} Console, go to **Login & Registration**. 2. Under **Account Recovery**, click on **Password Recovery**. 3. Toggle the switch to enable passwords recovery option to allow users to recover their passwords. 4. Select both **Email Link** and **SMS OTP** or one of the options to enable them for your organization. ![Password Recovery Configuration]({{base_path}}/assets/img/guides/organization/account-recovery/password-recovery/configure-password-recovery.png){: width="800" style="display: block; margin: 0;"} 5. Configure the corresponding settings.

Email Link

Notify on successful recovery Specifies whether to notify the user via an email when password recovery is successful.
Recovery link expiry time Specifies the duration (in minutes) after which the email link will expire.

SMS OTP

Password recovery OTP expiry time Specifies the duration (in minutes) after which the OTP code sent through SMS will expire.
{% endif %} 6. Configure the following settings if you wish to customize the OTP pattern.
Include upper case letters If nothing else is selected, the code will have only upper case letters or else a combination of upper case letters and any other selected character types.
Include lower case letters If nothing else is selected, the code will have only lower case letters or else a combination of lower case letters and any other selected character types.
Include numeric characters If nothing else is selected, the code will have only digits or else a combination of digits and any other selected character types.
Password recovery OTP code length Specify the length of the code
!!! info Including a character set does not guarantee that at least one of those characters will be included in each OTP code. 7. Set the following settings to configure the limitations for password recovery attempts.
Max failed attempts count Specifies the maximum number of incorrect entries allowed for a password recovery method.
Max resend attempts count Specifies the maximum number of times a user can request to resend the OTP or recovery link.
8. Click **Update** once you configure the required settings. {% endif %} {% if product_name == "WSO2 Identity Server" %} ## Configure callback URL validation When running {{ product_name }} behind a proxy or with a different port configuration, you may encounter callback URL validation errors during the password recovery flow. To resolve this, you need to configure a regex pattern to validate the callback URL. To configure the callback URL validation: 1. Open the `/repository/conf/deployment.toml` file. 2. Add the following configuration under the `[identity_mgt.recovery]` section: ```toml [identity_mgt.recovery] callback_url = "${carbon.protocol}:\\/\\/${carbon.host}\\/.*" ``` This regex pattern validates the callback URL sent in the password recovery email. !!! note - The sample regex pattern `${carbon.protocol}:\\/\\/${carbon.host}\\/.*` works for most deployments. Modify it to meet your specific requirements. - When testing the product, you can use `^https:\/\/localhost:9443\/.*` as the callback URL regex. - For production deployments, ensure the regex pattern matches your actual deployment URLs. - This configuration also applies to username recovery. 3. Save the file and restart {{ product_name }} for the changes to take effect. {% endif %}