这是indexloc提供的服务,不要输入任何密码
Skip to content

Why show the username and password when disabled #5386

@andyquinterom

Description

@andyquinterom

I've been having a couple minor issues with some users that get confused with the disabled Username/Password login method. We use a SSO for pgAdmin so the user has to click on the bottom button instead of writing their email and password.

This is a question. Is it possible to automatically start OAuth2 when the user hits the homepage or is it impossible.

If it's not possible then perhaps we could do somethings like the following in the login_user.html.

{% if not (config.OAUTH2 in config.AUTHENTICATION_SOURCES or config.KERBEROS in config.AUTHENTICATION_SOURCES) and config.AUTHENTICATION_SOURCES | length == 1 %}
    {{ render_username_with_errors(login_user_form.email, "text") }}
    {{ render_field_with_errors(login_user_form.password, "password") }}
    <button name="internal_button" class="btn btn-primary btn-block btn-login" type="submit" value="{{ _('Login') }}">{{ _('Login') }}</button>
{% endif %}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions