This will require checking the authentication_methods.password or email_auth_enabled field in the server-settings API response. If this field is disabled, the login page should only display the enabled external authentication method buttons.
Docs: https://zulip.com/api/get-server-settings#response
(Noticed while logging in xi—zulipchat—com)