• Resolved mikenytola

    (@mikenytola)


    ERROR: An error was encountered while trying to authenticate. Please try again.

    I have been having this issue getting close to a year now and it’s driving me absolutely nuts. I have tried many times to resolve the issue and nothing has worked. The thing that I don’t get is that I am the only one that has this issue with logging in. I am the main Admin of the site, and I built the entire customized theme from the ground up, so I know it from front to back. I’m a senior full-stack developer with many years of experience with even WordPress, so it’s not like I don’t know what I’m doing either.

    We basically have two admins, and the other admin has never had this issue even once. I have found many articles on this in the forums and have tried many suggestions from Wordfence, and nothing seems to work. What I also don’t get is that my Stage site, I have never had this issue, and it uses the same exact Wordfence settings as prod. Absolutely identical. It’s also on the same host/server/etc.

    Steps to login.
    I have to do this almost every single time I login.

    1. Go to login and login (credentials are correct). Which gives me the error:
      ERROR: An error was encountered while trying to authenticate. Please try again.
    2. Next I login to FTP, rename the plugin folder.
    3. Go to the login and login again, which then gives me the error:
      "Error:?Cookies are blocked or not supported by your browser. You must?enable cookies?to use WordPress."
      My cookies are enabled already.
    4. Then I refresh the page, which then asks “are you sure you want to resubmit…” which I agree to, and then the site reloads and logs in.
    5. I then go through the steps of getting Wordfence back on.
    6. If I log off, then try to log back in again, I don’t have the problem. If I close the browser and end the session, I do have the problem again and have to start over again.

    I have tried

    1. Completely removing the plugin, re-installed, re-configured, let it go through the learning phase, etc. Including deleting the database tables and starting 100% fresh.
    2. Using WF Assistant to disable firewall before reenabling it.
    3. Compared Stage to Prod for differences (htaccess, configs, wf settings, etc.) Nothing seems to be different.
    4. Tried different browsers with a clean cache/cookies/etc. I have tried in all of these browsers, all with the same exact results when trying to login.
      • Chrome
      • Firefox
      • Edge
      • Opera
      • Brave
      • Safari
      • Vivaldi
    5. I have tried logging in off any firewall, on my work firewall, using my firewall to login to the same location as the other admin.
    6. I manage multiple WordPress sites, using Wordfence, and this is the only site I have this issue. All using almost identical configs.
    7. I have tried multiple different things to fix the `Cookies are blocked or not supported by your browser. error by adding to the php, htacess, etc..
    8. I have disabled all browser extensions to make sure none of them were causing the issue, that also did not work, I also did this in the other browsers.
    9. I have tried adding my IP to the whitelist which should bypass any issues. I have also removed my IP’s.
    10. I have created a new user to try to login with. Same problem.
    11. I have tried to login with all plugins turned off (except necessary ones), and I only have the login issue when Wordfence is enabled.
    12. I tried using my old computer, but it also had this issue (Mac Intel).
    13. I tried using my wife’s computer, (Mac Intel), same issue.
    14. I have tried with the laptop not plugged into anything (usb, power, monitors, hubs, etc).
    15. I have tried on/off my work VPN. I have tried on/off my personal VPN. I have tried logging in from the location of where the other Admin logs in. No change, same problem.
    16. I have tried with 2FA on/off.
    17. I have tried with tried with Google reCaptcha on/off.

    When I try to login on my work laptop, which is configured almost identical to mine, I CAN login (Mac Intel). Since I use my work and home laptops for development, I try to keep them setup exactly the same. Why it works there, I have no idea. Both computers OS’s are up to date, as well as browsers. Why it works on that Mac, but not my current Mac (m1), my older Mac (Intel), and my wife’s Mac (Intel), with all of them being on the same OS versions. All of them I used the same user/pass.

    At this point I’m at a loss of what to do. No “solution” I have found online or the forums has worked.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfscott

    (@wfscott)

    Hello, @mikenytola

    Thanks for the information.

    This could be a CORS error from the domain not matching where the AJAX calls are made. This can happen if using www in the browser and the site is configured to use the bare domain without www, or vice versa.

    On the device where it doesn’t work, please try adding www to the URL manually. The WordPress login page doesn’t redirect automatically on wp-login.php. It may be a difference whether the browser remembers to use the www or not if it had been redirected to another page before.

    If adding?www?manually works, your browser may remember that which can make the problem go away for that device. It’s still usually best to add a redirect to .htaccess or nginx config, to avoid issues with login plugins.

    Let me know if you have any questions.

    Thanks,
    Scott

    Thread Starter mikenytola

    (@mikenytola)

    I cannot believe it was that easy. Geesh. I usually use the browsers auto complete to go to the login page. This time I manually entered the url (with www), and logged in no problem.

    Thank you for helping me with this year long problem… with the stupid simple solution! lol

    • This reply was modified 1 year, 6 months ago by mikenytola.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ERROR: An error was encountered while trying to authenticate. Please try again.’ is closed to new replies.