Skip to content
  • Home
  • Log In
  • Register

p1r@t3z

The personal tech blog of Drvspan — (aka p1r@t3z, Drvs, spaniakos). Deep dives into coding, Linux, DevOps, AI, open-source projects, and digital freedom. Real tech. No fluff.

Tag: 404 error

frontpage screenshot

How to fix Google Login 404/403 error and ModSecurity [Resolved]

Posted on July 21, 2020October 16, 2025 by drvspan

I have created this blog in order for me to write about my experience as software engineer.

In an other post I will comment on my used plugins and why I made choose to use them, but for now let see a problem that I am having and what is the possible solutions. This solution is going to be views from the VPS side of hosting and the WHM no access side of hosting.

But first let’s see what is the problem.
For my login form I choose to have the option for google, facebook and twitter login button, for the users to have easy register/login choices.

While facebook and twitter worked out of the box using Nextend Social Login, Google has a problem which by the first look I couldn’t find what it was.

But with a closer look to the URI

https://www.piratez.gr/wp-login.php?loginSocial=google&state=<state>&code=<code>&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none

This resulted to 404 – page not found error.

Now I had two point of information:
1) 404 error
2) The URI which has the depricated but used for backward compatibility https://www.googleapis.com/auth/userinfo.email and https://www.googleapis.com/auth/userinfo.profile

This scopes have been changed to the email and profile scope that you can see in the URI.

Immediately I knew that there was a problem with some of the values, therefore I removed the deprecated values and tried to manually re-apply the link and it got through.

There is a major problem here. This variables are sent directly from google using the callback URL I have declared to google API, therefore I cannot interfere with the values. On top of that I had a WAF installed in the site. (Which we will talk in an other post about it).

My second try, was to deactivate the WAF and try again, but it resulted in the same failure, with the same error page and the same symptoms.

The only other underlying security I have, is the modsecurity, which has rules and filters about the urls and how to process them. Sadly this blog is currently in a host in https://www.inwebpro.gr, an excellent host with a focus on security, and especially secure configuration for the server and good support and hosting. The only downside, is that the WHM (reseller hosting), has somewhat limited options that you can do, except if you ask for the permissions from the company, which will somewhat “void” you support on self harmful acts in the server’s instance.

What I want to achieve, is to whitelist the domain https://www.googleapis.com , in order for mode security to allow this url for as long as google provides it.

Now I am waiting for a reply in my request ticket ( it won’t take long, but as this is no critical issue, I have marked my ticket with moderate priority), but as I have searched a little more in google about the issue I have found that this have already been answered to the nextend website here.

I will return with a version 2 of this post to analyze the resolving of the issue.

After my communication with the hosting provider, the issue is RESOLVED by disabling the specific URL from the modsecurity rule for the specific hosting.
If you ever encounter the same problem, just disable the specific URL from the modsecurity rule, and all will work as expected!

EDIT 3/2/2022: We have made a server migration, and we are waiting for the server admin to do the same exception to the mod security.

EDIT 4/2/2022: login is now again working by using the same fix.

Recent Posts

  • Who Needs a Friday — Free Day When You Have a Project to Do? On Fire.
  • The Sound of Obsession — When Repetition Becomes Mastery
  • The War of Egos: Mastering the Powerful Art of Being Unbothered in a World Obsessed with Being Right
  • Monday Momentum: The Quest for the Next Big Thing Begins!
  • Sunday Fun-Day — How to Enjoy the Art of Doing Nothing Right

Hacker News

  • The Entry-Level Hiring Process Is Breaking Down
  • Individual Contributor Advice: Make Breakthroughs
  • I used to read like this
  • Rails Pulse: Performance monitoring and debugging gem for Rails application
  • John Searle – Consciousness in Artificial Intelligence
  • AI probably won't kill us all: book review of If Anyone Builds It, Everyone Dies
  • Multi-Agent MCP Skillset Architecture
  • Designing Custom UUIDs
  • DeSantis wants Florida to move ahead with AI policies
  • Show HN: LyneCode Beats AntiGravity and Codex (and It's Open Source)

Archives

  • October 2025 (9)
  • September 2022 (1)
  • February 2022 (1)
  • July 2020 (2)

Recent Comments

  • Back to 2012 — One Post a Day - p1r@t3z on Welcome to the Age of AI! Revolutionary – Redefining – Dangerous
  • How to recover your Hard Drive content! WARNING Took 1 month) – p1r@t3z on Love PirateZ.gr? Buy Me a Coffee ☕ and Keep It Running!

Helping Links

Cookie Consent
Privacy Policy

Categories

  • Affiliate and Donations
  • Corner of ideas
  • Fun Times
  • MacOS
  • SysAdmin
  • Uncategorized
  • Web Developer

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tags

ai almalinux brainstorming centos coding creativity daily life daily writing developer life devlife ego everyday chaos focus freelancing lazy Sunday life off-script linux migration mindset minimalism monday motivation obsession personal growth personal stories philosophy piratezblog piratez blog PirateZ journal productivity projectflow projects psychology real life repetition rest day self-awareness self-growth Sunday vibes sysadmin troubleshooting unplanned moments weekend weekend life wisdom

top
© 2025 p1r@t3z
Theme: Techieblog by WP Crumbs