Skip to main content

Prebuilt authentication dialog

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.

The React SDK's prebuilt dialog packages Vertex authentication states into a modal surface. The application controls when the dialog opens and how successful authentication changes navigation. The component controls the active auth step, validation display, provider initiation, callback continuation, and focus containment.

Use a Dialog when the app needs an in-context entry point without rebuilding every auth state. mode="redirect" starts Hosted authentication; mode="embedded" renders the controlled transaction flow inside the dialog. Both complete through Authorization Code + S256 PKCE.

Render only methods offered for the current login or signup intent. Preserve required MFA and Provider callback continuation, and do not treat closing the dialog as proof that a remote operation was cancelled. If cancellation or completion has an uncertain result, keep the SDK's explicit recovery state visible.

The application must still provide a SPA public client, exact redirect and post-logout URIs, and allowed origin. It must render an accessible trigger and restore focus when the dialog closes.