From d7e538e524b0578668c1a5453288f062fec280c6 Mon Sep 17 00:00:00 2001 From: nelind Date: Thu, 25 Dec 2025 02:39:36 +0100 Subject: [PATCH] actually fix localhost client support Change-Id: kzwomukpnxwlmrroxnlllnkvxszqvpuv --- frontend/src/lib/oauth.ts | 2 +- src/oauth/client.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/oauth.ts b/frontend/src/lib/oauth.ts index a0e825d..b21b51c 100644 --- a/frontend/src/lib/oauth.ts +++ b/frontend/src/lib/oauth.ts @@ -9,7 +9,7 @@ const SCOPES = [ ].join(' ') const CLIENT_ID = !(import.meta.env.DEV) ? `${window.location.origin}/oauth/client-metadata.json` - : `http://localhost/oauth/client-metadata.json?scope=${SCOPES}` + : `http://localhost/?scope=${SCOPES}` const REDIRECT_URI = `${window.location.origin}/` interface OAuthState { diff --git a/src/oauth/client.rs b/src/oauth/client.rs index a587174..5ff72eb 100644 --- a/src/oauth/client.rs +++ b/src/oauth/client.rs @@ -91,7 +91,8 @@ impl ClientMetadataCache { url.scheme() == "http" && url.host_str() == Some("localhost") && url.port().is_none() - && url.path().is_empty() + // empty path + && url.path() == "/" } else { false } -- 2.50.1