Can't disable login page

Hello,
I am trying to disable the login page so that everyone with the right IP-Address can see the dashboard. I configured the grafana.ini and set:
disable_login_form = true

# enable anonymous access 
enabled = true

# specify role for unauthenticated users
org_role = VIEWER

The settings show up in the adminstrator panel on the website but all it dose is making the login form buggy. The input fields are gone but you still need to log in.


It is basically the same as with this question https://community.grafana.com/t/sign-in-screen-no-input-boxes-for-username-password/28015 but i don’t want a login page at all.
I hope you have answers.

I did a quick test with a docker image and a few settings and it seems to work:

docker run --rm -p 3003:3000 -e "GF_AUTH_ANONYMOUS_ENABLED=true" -e "GF_AUTH_ORG_ROLE=viewer" -e "GF_AUTH_DISABLE_LOGIN_FORM=true" grafana/grafana:6.7.1

Maybe you have multiple orgs and need to define the org name too?

You probably don’t need to disable the login form. That is only if you want to force users to login with OAuth or similar.

I have a similar issue and changing these settings does not help to stop the login page appearing instead of my graphs. I am doing it through docker and these are my environment settings inside my docker-compose.yml

        - GF_AUTH_ANONYMOUS_ENABLED="true"
        - GF_AUTH_ANONYMOUS_ORG_NAME="Main Org."
        - GF_AUTH_ANONYMOUS_ORG_ROLE="Admin"
        - GF_AUTH_BASIC_ENABLED="false"
        - GF_AUTH_DISABLE_LOGIN_FORM="true"
        - GF_AUTH_DISABLE_SIGNOUT_MENU="true"
        - GF_AUTH_PROXY_ENABLED="true"
        - GF_USERS_ALLOW_SIGN_UP=false

Does anyone know why they aren’t working?

2 Likes

hi Daniel,
I have exact same problem; want to use graphs in OpenHab Habpanel frame widget, but inside this widget I only see login screen of grafana which I can not bypass login screen.
I tried your envirnonment settings in .yml file but no luck… :frowning: I hope you have found solution which you can share here.

I am using Grafana Helm chart to deploy.

Based on grafana/conf/defaults.ini at main · grafana/grafana · GitHub

This works for me :smiley:

grafana.ini:
  auth:
    disable_login_form: true
  auth.basic:
    enabled: false
  auth.google:
    enabled: true
    allow_sign_up: true
    auto_login: false
    client_id: xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
    client_secret: $__env{GOOGLE_CLIENT_SECRET}
    scopes: openid email profile
    auth_url: https://accounts.google.com/o/oauth2/v2/auth
    token_url: https://oauth2.googleapis.com/token
    api_url: https://openidconnect.googleapis.com/v1/userinfo
    allowed_domains: hongbomiao.com
    hosted_domain: hongbomiao.com
    use_pkce: true

Full deployment code can be found here.