Class LoginDivBuilder

java.lang.Object
su.onno.ui.divkit.LoginDivBuilder

public final class LoginDivBuilder extends Object
Builds the server-driven login screen as a DivKit card from the available AuthMethods. The server decides what login looks like — which providers, whether a password form is offered — so adding an IdP needs no client change.

SSO options are plain DivKit buttons (a tap is just a redirect, so an opaque onno://auth/sso/{id} action suffices). Username/password capture, however, needs to read the typed values on submit — which a DivKit action can't do — so it is delegated to the onno-login-form custom block (a React widget), mirroring how onno-form handles rich entity forms elsewhere.

When more than one kind of method is available (a password and at least one SSO provider) the screen is split into two steps so it stays uncluttered: step one is a picker of equal-width method buttons (each SSO provider plus a "Sign in with password" button), and choosing password advances to step two, which shows only the credentials form behind a back link. The client re-requests the card with ?step=password on selection (and back to the picker on onno://auth/back). A single-kind screen (password-only or SSO-only) skips the picker and renders inline as before.