Found error after OAuth login

  • What Grafana version and what operating system are you using?
    RHEL8.6 Grafana 9.6

  • What are you trying to achieve?
    Find more post for solve this problem but not match.

  • How are you trying to achieve it?
    Tacking network it allow and can access.

  • What happened?
    Can not use OAuthLogin ? error

logger=context userId=0 orgId=0 uname= t=2023-01-24T14:52:51.28735047+07:00 level=error msg=login.OAuthLogin(NewTransportWithCode) error="Post \"\": dial tcp connect: connection timed out"
logger=context userId=0 orgId=0 uname= t=2023-01-24T14:52:51.287624215+07:00 level=error msg="Request Completed" method=GET path=/login/google status=500 remote_addr= time_ms=262904 duration=4m22.904587187s size=1365 referer= handler=/login/:name_badge: 
  • What did you expect to happen?

I want to use OAuth 2 login to Grafana.

  • Can you copy/paste the configuration(s) that you are having problems with?
enabled = true
allow_sign_up = true
client_id = 
client_secret = 
scopes =
auth_url =
token_url =
api_url =
allowed_domains =
hosted_domain = true

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
  1. Request URL:
[type or paste code here](
  1. Request Method:


  1. Status Code:

500 Internal Server Error

  1. Remote Address:

  1. Referrer Policy:


  • Did you follow any online instructions? If so, what is the URL?
    Yes , i trie to do it ,But it not work.

I think you need your ‘allowed_domains’ to be your email domain…

i.e. If your email address was you need to set ‘allowed_domains’ to be ‘allowed_domains =

I hope that makes sense.