fix: silence expected console noise from OIDC discovery and router hydration

- ServerConfigsLoader: skip validateAuthMetadata when getAuthMetadata()
  rejects (404 on /auth_issuer means server uses traditional SSO, not
  native Matrix OIDC/MAS - this is expected and should not log errors)
- Router: use HydrateFallback={() => null} instead of hydrateFallbackElement={null}
  so react-router v7 counts it as truthy and suppresses the spurious warning

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lotus Bot
2026-05-22 14:24:06 -04:00
parent 2e160ebacd
commit b088cb17b8
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -31,10 +31,14 @@ export function ServerConfigsLoader({ children }: ServerConfigsLoaderProps) {
const authMetadata = promiseFulfilledResult(result[2]);
let validatedAuthMetadata: ValidatedAuthMetadata | undefined;
try {
validatedAuthMetadata = validateAuthMetadata(authMetadata);
} catch (e) {
console.error(e);
// Only validate if the server returned metadata — a rejected promise means no native
// Matrix OIDC (MSC3861/MAS), which is normal for servers using traditional SSO.
if (authMetadata !== undefined) {
try {
validatedAuthMetadata = validateAuthMetadata(authMetadata);
} catch (e) {
console.error(e);
}
}
return {