sentry-auth-google icon indicating copy to clipboard operation
sentry-auth-google copied to clipboard

Authentication error: The domain for your Google account (None) is not allowed to authenticate with this provider.

Open okainov opened this issue 6 years ago • 6 comments

Suggestion from https://github.com/getsentry/sentry-auth-google/issues/27#issuecomment-397082005 does not work

https://github.com/getsentry/sentry-auth-google/issues/27#issuecomment-490260014 gives subj error

Maybe I forgot yet another hack in Google settings, not sure...

okainov avatar Jul 16 '19 01:07 okainov

That's most probably coming from the fact that your sentry config set sentry:system.url-prefix isn't set. If you're on <9.1.2 you will run into a follow up issue: https://github.com/getsentry/sentry/issues/13565

ThYpHo0n avatar Jul 23 '19 13:07 ThYpHo0n

@okainov Are you using @gmail.com account to get the client id and secret? We ran into the same error when we used a personal credential set in the config. It looks like Google doesn't send the hd (hosted domain) field for non-Google apps accounts (sounds obvious in retrospect). This could be one of the reasons which lead to this error.

/ cc @dcramer

kgrz avatar Feb 07 '20 06:02 kgrz

Any news? I recieve the same error and i specify my sentry:system.url-prefix well

50l3r avatar Apr 21 '20 19:04 50l3r

We started having this issue when our Google Suite domain changed from something.com to something-else.io. Any pointer as to how to bypass the ERR_INVALID_DOMAIN error?

sam-rad avatar Nov 17 '20 22:11 sam-rad

So with the help of Change SSO Domain I was able to add the new domain to the list with the following sql:

update
   sentry_authprovider SET config = '{"domains": ["something.com", "something-else.io"], "version": "1"}'
where 
   # change the id to whatever the `google` provider row is
   id = 1;

sam-rad avatar Nov 18 '20 00:11 sam-rad

We also had the same problem when we were transitioning domains, the above SQL allowed us to use both domains at once! Cheers!

michaelpsomiadis avatar Feb 02 '21 01:02 michaelpsomiadis