getsentry / sentry-auth-google

Google Apps SSO provider for Sentry
Apache License 2.0
34 stars 70 forks source link

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

Open okainov opened 5 years ago

okainov commented 5 years ago

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...

ThYpHo0n commented 5 years ago

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

kgrz commented 4 years ago

@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

50l3r commented 4 years ago

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

sam-rad commented 3 years ago

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 commented 3 years ago

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;
michaelpsomiadis commented 3 years ago

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