From e9f6d186dc947863a5dfc18c8d6f2016b8030c88 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 19 Apr 2025 21:57:50 +0200 Subject: [bugfix] Fix '+'-separated scopes not being recognized (#4028) * [bugfix] Fix '+'-separated scopes not being recognized * comment --- web/source/settings/lib/query/user/applications.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/source/settings/lib/query/user/applications.ts') diff --git a/web/source/settings/lib/query/user/applications.ts b/web/source/settings/lib/query/user/applications.ts index 9d271a1e1..38856ccba 100644 --- a/web/source/settings/lib/query/user/applications.ts +++ b/web/source/settings/lib/query/user/applications.ts @@ -107,12 +107,15 @@ const extended = gtsApi.injectEndpoints({ const instanceUrl = state.login.instanceUrl; // Parse instance URL + set params on it. + // + // Note that any space-separated scopes are + // replaced by '+'-separated, to fit the API. const url = new URL(instanceUrl); url.pathname = "/oauth/authorize"; url.searchParams.set("client_id", app.client_id); url.searchParams.set("redirect_uri", redirectURI); url.searchParams.set("response_type", "code"); - url.searchParams.set("scope", scope); + url.searchParams.set("scope", scope.replace(" ", "+")); // Set the app ID in state so we know which // app to get out of our store after redirect. -- cgit v1.2.3