AutoLogin — Auto Login After Password Reset¶
Extension for Magento 2¶
User Guide¶
CopeX GmbH
Web: https://copex.io
Email: office@copex.io
Table of Contents¶
| Section | Page |
|---|---|
| 1 Requirements | 2 |
| 2 Configuration | 2 |
| 2.1 General Settings | 2 |
| 3 Features | 3 |
| 3.1 Automatic Login After Password Reset | 3 |
| 3.2 Redirect to Cart | 3 |
| 4 Troubleshooting | 4 |
1 Requirements¶
- Magento 2.3 or higher (compatible with 2.4)
- PHP 8.1 or higher
- Hyvä Theme or Luma Theme
2 Configuration¶
The module configuration is located in the Magento 2 admin panel under Stores > Configuration > Customers > Customer Configuration > Auto Login After Password Reset.
2.1 General Settings¶
Navigate to Stores > Configuration > Customers > Customer Configuration > Auto Login After Password Reset.
- Enable Auto Login After Password Reset — Enables or disables automatic login after a successful password reset (Yes / No). When disabled, Magento's default behavior applies: customers are redirected to the login page after resetting their password.
3 Features¶
3.1 Automatic Login After Password Reset¶
When a customer successfully resets their password via the link in the password reset email, the module automatically logs them into their account. The extra manual login step is eliminated.
Flow:
- Customer clicks the password reset link in the email.
- Customer enters and confirms the new password.
- The module validates the inputs (match, minimum length).
- On success, the password is set via Magento's
AccountManagementInterface. - The customer session is started and the customer is automatically logged in.
- The customer is redirected to the cart or the account dashboard.
3.2 Redirect to Cart¶
After automatic login, the module checks whether the customer's active cart contains any items. If the cart is not empty, the customer is redirected directly to the cart page. An empty cart redirects to the account dashboard instead.
4 Troubleshooting¶
The following error messages may appear during a password reset:
-
Passwords do not match — The entered passwords are not identical. The customer must fill in both fields again.
-
Password must not be empty — The new password field was left blank. A valid password must be entered.
-
Token expired or invalid — The password reset link is no longer valid. The customer must request a new reset link.
When an error occurs, the message is shown on the password reset page and the customer can try again.
License¶
Proprietary — CopeX GmbH. One license per production Magento instance. Test and development environments do not require an additional license.
