Grafana with Google oauth

Hey Everyone!

I want to set up Google oauth (exactly like it is in the official documentation Configure Google OAuth2 authentication | Grafana documentation ). Here is how my grafana.ini looks like:

grafana.ini: |
    check_for_updates = true
    url =
    mode = console
    data = /var/lib/grafana/
    logs = /var/log/grafana
    plugins = /var/lib/grafana/plugins
    provisioning = /etc/grafana/provisioning
    domain =
    enabled = true
    client_secret = XXXXXXXXXXXXXXXXXXX
    scopes =
    auth_url =
    token_url =
    allow_sign_up = true
    hosted_domain =

And here is what I set up inside OAuth 2.0 Client IDs:

And then I get this error when trying to authenticate with Google Oauth in Grafana:

Maybe it is because it tries to use port 3000, however even when I explicitly use 443 or 80 it still uses 3000 port, I’m not sure that this causing a problem, but it is the only thing I can think about

Please configure root_url properly.


It seems like you’ve configured Google OAuth in Grafana, but the issue you’re encountering with the redirect URI can be resolved. Make sure that the redirect URI in your Google OAuth client settings matches the one configured in Grafana, including the correct port (e.g.,

Additionally, ensure that the Grafana server is running on the expected port (3000 in this case) and that there are no conflicts or proxies interfering with the redirect.

If the issue persists, consider double-checking the Grafana documentation for any additional configuration steps or Vermögen troubleshooting tips specific to your setup. Good luck with your OAuth integration!