• I just spent a few hours troubleshooting why authenticating with a google OAuth was getting redirected to / on my wordpress 6.1.1 sites. I tried google sitekit, and i tried wp mail smtp authenticated to gmail. both had the same result, when oauth tried to send me back to my site to complete the transaction, my site redirected from the wp-admin url over to /, the main home page of my site.

    After some time, I found that the presence of the word “code” in the query string was causing the redirect. After some time investigating whether some manner of WAF or wordfence was causing the problem, I started turning off plugins in order to narrow down the problem. This plugin was causing the problem. I cannot explain why, but you can test it by going to any wp-admin url, and adding ?code to the end of the url (or &code if there are already query parameters).

  • The topic ‘Causing redirect issue with google OAuth’ is closed to new replies.