• Resolved leok24

    (@leok24)


    Hi, i m having a problem with 2fa feature. When i try to login as a simple user to my website and the 2fa activates, if i give a wrong password the first time it asks again for the correct one. So far so good. Then the second time that i give the correct password i logged in but it redirects me to wordpress backend. https://www.example.com/wp-admin I want to prevent that. How do i do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Paul

    (@paultgoodchild)

    Unless there’s a part of this I’m missing, this isn’t a 2FA problem. Normally you’re redirected to the WordPress admin area after you login. Unless you have a different, custom setup?

    Thread Starter leok24

    (@leok24)

    My template uses the STM LMS plugin and its login system. As i mentioned before when i press login from my site’s frontend the url changes to https://www.example.com/lms-login. I enter the credentials and the 2fa feature kicks in. The shield 2fa page comes and asks for the code that has been sent to the email. The url changes to https://www.example.com/lms-user. Now if i enter a valid code i enter my site’s frontend as a simple user. If i enter a false code the shield 2fa page asks for the correct one but the url changes to https://www.example.com/wp-admin. I want to prevent that so the url still remains like the last one https://www.example.com/lms-user cause otherwise the user logs into the backend of my website

    Plugin Author Paul

    (@paultgoodchild)

    I’m not sure if this is something we can fix easily. Shield will try to detect the necessary redirect, but in the case of a failed code, I’d have to check on how this is handled.

    But all this aside, if you never want a subscriber to access the admin panel, and redirect elsewhere, you can set this up with a code snippet to achieve this.

    Without this, there’s nothing to stop me logging in, and then manually typing in the admin area and accessing it that way.

    Thread Starter leok24

    (@leok24)

    Thank you very much for your quick responses! As you proposed with writting some code i found a temporary solution for this issue by redirecting all non admins to the site’s url. If you investigate this more i d like to know there is any solid solution. Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2fa redirect problem’ is closed to new replies.