Embedded authentication
Examples on this page use default oauth_tokens. The same UI supports BFF server sessions; use the connected-application transport so code exchange and tokens stay on the backend.
Embedded mode renders sign-in and sign-up controls inside the application. The application owns accessible form layout, error placement, loading states, and safe handling of user-entered values. Vertex remains the authority for credential validation, authentication policy, rate limits, provider discovery, and token issuance.
Provider buttons must come from Vertex discovery for the current SPA clientId. Do not construct private provider
routes or assume that a provider enabled for one Application is enabled for another.
Embedded authentication starts a controlled transaction through the SDK. Credential proof, required MFA and completion belong to that same transaction. Completion returns an authorization code; the SDK exchanges it using the original S256 PKCE verifier and the discovered OAuth token endpoint. Refresh also uses OAuth.
Use <SignIn mode="embedded" /> and <SignUp mode="embedded" /> inside IamProvider. Select an explicit
EMAIL, USERNAME or supported PHONE login identifier; phone input includes its region when needed. Registration
accepts only the effective email/username kinds allowed by the Application. A string that looks like a phone number
must not silently change the selected identifier kind.
Provider buttons and passwordless controls appear only when discovery reports them ready for the current intent. A Provider return may still require MFA; a callback alone is not authentication success. Let the SDK continue the original transaction instead of starting another login.
Registration is separate from login. Complete any required verification, then offer sign-in explicitly; successful registration does not create a normal authenticated session automatically. Keep tokens in memory by default and never put a client secret in browser code.
For application-owned forms, use the Custom integration. For an authenticated user, use Account security rather than reusing a public sign-in form for account changes.