OAuth - Invalid hosted domain

(Bas van Leeuwen) #1


All of a sudden, we are seeing the following error in the logs
(google_oauth2) Authentication failure! invalid_credentials: OmniAuth::Strategies::OAuth2::CallbackError, invalid_hd | Invalid Hosted Domain

Our users trying to log in with Google OAuth see this:

I have changed the hd setting recently to * and this worked for a while.
At the moment, nothing I change this parameter to (empty, * and our own domain) will solve my log in troubles.

(Bas van Leeuwen) #2

Note: a restart of the server seems to have fixed this; no idea what happened.

(Bram Rongen) #3

Super wild guess, could be an issue with your system clock. Are you using ntpd to keep it up-to-date?

(Michael - DiscourseHosting.com) #4

Yes, ntpd is running.

BTW the server was not restarted, just the Discourse unicorn processes.

(Bram Rongen) #5

Right, then my guess doesn’t make sense :slight_smile: