From e1abd36b016220fdea8756d8a9c730ad44259556 Mon Sep 17 00:00:00 2001 From: Jesse Wright <63333554+jeswr@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:46:05 +0100 Subject: [PATCH] fix: allow opting in to insecure OAuth requests oauth4webapi enforces HTTPS on every request, so the auth-code + PKCE + DPoP flow could not talk to a local Community Solid Server over plain HTTP. Rather than guessing which issuers are loopback, expose a global switch consumers toggle themselves. InsecureConfiguration.allow() is deprecated on purpose so the security implication shows up at the call site. Also replaces the unconditional allow in BearerTokenProvider, and covers ClientCredentialsTokenProvider, which had no way to reach a local issuer at all. --- index.html | 5 ++++- src/BearerTokenProvider.ts | 10 ++++----- src/ClientCredentialsTokenProvider.ts | 7 +++++-- src/DPoPTokenProvider.ts | 7 ++++--- src/InsecureConfiguration.ts | 29 +++++++++++++++++++++++++++ src/mod.ts | 1 + 6 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 src/InsecureConfiguration.ts diff --git a/index.html b/index.html index c835634..972841a 100644 --- a/index.html +++ b/index.html @@ -15,9 +15,12 @@ }