Production Hardening
What This Is#
A release checklist for production Sign in with Lovelace deployments.
Who This Is For#
Engineers and operators responsible for release readiness.
What You Will Finish With#
- A verified configuration and verification pipeline.
- Predictable fallback behavior.
- Safer operational defaults.
Going live#
Your app works on localhost, 127.x.x.x, and [::1] redirect URIs from the
moment you create it. A redirect URI anywhere else, such as
https://app.example.com/api/auth/callback, needs an approved developer
account, because an app on a public site can sign in people other than you. The
device authorization grant (urn:ietf:params:oauth:grant-type:device_code)
needs one too: it has no redirect URI, and anyone who enters the app's code
signs in to it.
- Your developer account was requested when you created your first app (or when you selected Register as a developer). The Apps page shows whether it is waiting for review or approved.
- Until it is approved, creating an app with a production redirect URI, or
adding one to an existing app, fails with
developer_approval_required. The response lists the redirect URIs that need approval innon_loopback_redirect_urisand the grant types ingrant_types_requiring_approval, and nothing changes. - Once it is approved, open Apps, select Edit redirect URIs on your app, and add the production redirect URI. You can also create a separate production app. Set the same client ID (and secret, for a server app) in your host's environment.
A rejected or suspended developer account cannot create apps, including
localhost ones; requests fail with developer_not_approved.
Configuration Checklist#
- Set
NEXT_PUBLIC_LOVELACE_OAUTH_CLIENT_ID. - Register exact production redirect URIs in client configuration, after your developer account is approved.
- Set explicit Accounts URL overrides only when needed.
- Use HTTPS in production environments.
Verification Checklist#
- Verify route validates issuer and audience.
- Verify route creates app session only on successful token validation.
- User-facing UI messages remain generic and actionable.
- Server logs include structured diagnostic context.
Browser Behavior Checklist#
- FedCM path works in supported Chromium browsers.
- Unsupported browsers redirect immediately.
- No polling loops in auth initiation path.