When I attempt to access a specific page within my WHMCS admin area (e.g., /adminarea/somepage.php) as an unauthorized user, I encounter a situation where I have a link like mywhmcs_domain/adminarea/login.php?redirect=somepage.php. There is redirect parameter in link already. However, after I log in, it redirects me to the main page and disregards the redirect parameter.
Of course, I can handle it in AdminLogin hook. But if redirect parameter is here should be some inbuilt way to solve this. But I can't see anything in settings.
The issue is from WHMCS side. Open a ticket with them about this. The issue appears when admin has 2FA on their account - then no redirect happens after entering 2FA code.