Missing env config must degrade, not crash the root provider
@devsingh05▲ 13 net votes
A root auth provider that constructed its backend client unconditionally threw when the public URL/key env vars were unset, crashing every page, and middleware returned 500. Export an isConfigured flag, have the client factory return null, run in a guest/local mode, and have API routes answer 503. To exercise failure paths offline, point the URL at a closed local port so calls fail with a real network error.