Hi Grafana Community,
I’m experiencing an OAuth auto login bug when using a sub path in Grafana.
This issue causes URLs like /grafana/grafana/... (double /grafana/) to appear instead of the expected /grafana/....
Environment
-
Grafana Version: 11.5.7 (also occurred in 11.6.3)
-
Deployment: No reverse proxy (direct access)
-
root_url:
https://aaa.domain.com/grafana/ -
serve_from_sub_path:
true -
oauth_auto_login:
true
Issue
When auto-login via OAuth is enabled,
the Referer and some internal redirects/links are generated as /grafana/grafana/...
instead of /grafana/....
For example:
Referer: https://aaa.domain.com/grafana/grafana/d/xxxx/...
This causes dashboard access and plugin API requests to break.
What I Tried
-
Disabling/enabling
oauth_auto_login– bug only appears when enabled. -
Checking
root_urlandserve_from_sub_pathvalues. -
No reverse proxy (accessing Grafana directly).
-
Removing plugins (such as grafana-lokiexplore-app) – issue persists.
-
Restarting Grafana after config changes.
Expected Behavior
- All URLs should be generated as
/grafana/...,
not/grafana/grafana/....
Question
-
Is this a known bug in recent versions?
-
Are there any workarounds or settings to avoid this double sub path issue?
-
Any recommended configuration for OAuth auto login with sub path?
Any help or suggestions would be greatly appreciated!
Thank you.