Skip to content
Lovelace

First-Party Integration

What This Is#

Guidance for Lovelace teams integrating the shared auth SDK into first-party apps.

Who This Is For#

Internal product teams that ship on the Lovelace platform.

What You Will Finish With#

  • The correct centralized SSO or relying-party integration for your app.
  • Clear bootstrap model for client provisioning.
  • Separation between Accounts runtime and app-specific setup.
  • Keep app client definitions in bootstrap manifests or setup scripts.
  • Sync client definitions into Accounts during environment bootstrap.
  • Keep Accounts runtime logic app-agnostic.

Protected Application Runtime#

Use centralized first-party SSO when every route requires a Lovelace platform session:

  • Protect routes with the shared first-party auth middleware.
  • Redirect signed-out users to Accounts while preserving their destination.
  • Consume the shared session cookie where deployment topology permits it.
  • Use the cross-domain bootstrap handoff when a shared cookie is unavailable.

Do not add an app-local /login page, signed-out application shell, or FedCM verification route to recreate the same platform session.

Relying-Party Runtime#

Use Sign in with Lovelace when the app is public or optional-auth, owns an app-local session, or is an explicitly designated conformance pilot:

  • UI uses AuthProvider and useLovelaceSignIn().
  • Verification route uses createLovelaceSignInRoute().
  • Unsupported browsers redirect through Accounts with the destination preserved.
  • Accounts service remains generic and does not depend on app-specific code paths.

Why This Model#

This avoids duplicating the centralized platform session while preserving a turnkey relying-party integration where FedCM provides value.