Which class I should override in order to redirect a customer to a specific page after login?
I have tried to set Redirect Customer to Account Dashboard after Logging in
in the store configuration but it is not working.
customerloginmagento2
Which class I should override in order to redirect a customer to a specific page after login?
I have tried to set Redirect Customer to Account Dashboard after Logging in
in the store configuration but it is not working.
Best Answer
A plugin is a better solution in this case because your extended class might need to be updated when Magento 2 updates.
Here is a solution using a after-plugin on LoginPost->execute() as suggested by Xenocide8998.
/Vendor/Module/etc/frontend/di.xml
:/Vendor/Module/Plugin/LoginPostPlugin.php
: