Is it somehow possible to remove the default username/password login view?
We only have OIDC enabled and see users constantly trying to log in via the default login interface rather than clicking on “sign in with OIDC”.
Is it somehow possible to remove the default username/password login view?
We only have OIDC enabled and see users constantly trying to log in via the default login interface rather than clicking on “sign in with OIDC”.
you can edit the templates to only have the button. read more here: https://docs.gitea.io/en-us/customizing-gitea/
edit: if you want to “go the extra mile” you could write some JS that autoclicks the button (maybe put a notice saying “Logging in…” or something too).
Thanks!
I was trying to put a custom signin_inner.tmpl
into custom/templates/custom/
.
However, I see no change. Maybe because signin_inner.tmp
is not listed in https://github.com/go-gitea/gitea/tree/master/templates/custom. Are only templates in that directory supported?
edit: if you want to “go the extra mile” you could write some JS that autoclicks the button (maybe put a notice saying “Logging in…” or something too).
Thanks. I think this might be to invasive for users - I’d like to let them click manually - but just give them one opportunity.
any template in https://github.com/go-gitea/gitea/tree/master/templates can be replaced. Assuming you aren’t using docker (as the custom folder path has a different name), then you can add a file at custom/templates/user/auth/signin_inner.tmpl
and have it override that specific template.
Made it! I am using docker and the default custom path is /data/gitea
.
Hence, mounting the following volume does the trick:
- $HOST_PATH/signin_inner.tmpl:/data/gitea/templates/user/auth/signin_inner.tmpl
Glad that worked out