From df5c284ba2441d80f94e66a2500497eee9491668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Fri, 30 Aug 2024 00:22:14 +0200 Subject: [PATCH] Include domain in client name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/auth.ts | 2 +- packages/pl-fe/src/actions/consumer-auth.ts | 4 ++-- packages/pl-fe/src/actions/external-auth.ts | 2 +- .../src/components/statuses/sensitive-content-overlay.tsx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pl-fe/src/actions/auth.ts b/packages/pl-fe/src/actions/auth.ts index c57726e9d..a438cef01 100644 --- a/packages/pl-fe/src/actions/auth.ts +++ b/packages/pl-fe/src/actions/auth.ts @@ -77,7 +77,7 @@ const getAuthApp = () => const createAuthApp = () => (dispatch: AppDispatch, getState: () => RootState) => { const params = { - client_name: sourceCode.displayName, + client_name: `${sourceCode.displayName} (${new URL(window.origin).host})`, redirect_uris: 'urn:ietf:wg:oauth:2.0:oob', scopes: getScopes(getState()), website: sourceCode.homepage, diff --git a/packages/pl-fe/src/actions/consumer-auth.ts b/packages/pl-fe/src/actions/consumer-auth.ts index 12442e21d..4e66b343d 100644 --- a/packages/pl-fe/src/actions/consumer-auth.ts +++ b/packages/pl-fe/src/actions/consumer-auth.ts @@ -14,9 +14,9 @@ const createProviderApp = () => const scopes = getScopes(getState()); const params = { - client_name: sourceCode.displayName, + client_name: `${sourceCode.displayName} (${new URL(window.origin).host})`, redirect_uris: `${window.location.origin}/login/external`, - website: sourceCode.homepage, + website: sourceCode.homepage, scopes, }; diff --git a/packages/pl-fe/src/actions/external-auth.ts b/packages/pl-fe/src/actions/external-auth.ts index 23c6d150c..d2b6bbf20 100644 --- a/packages/pl-fe/src/actions/external-auth.ts +++ b/packages/pl-fe/src/actions/external-auth.ts @@ -37,7 +37,7 @@ const createExternalApp = (instance: Instance, baseURL?: string) => if (getQuirks(instance).noApps) return new Promise(f => f({})); const params = { - client_name: sourceCode.displayName, + client_name: `${sourceCode.displayName} (${new URL(window.origin).host})`, redirect_uris: `${window.location.origin}/login/external`, website: sourceCode.homepage, scopes: getInstanceScopes(instance), diff --git a/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx b/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx index e00319b89..6163fb1ac 100644 --- a/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx +++ b/packages/pl-fe/src/components/statuses/sensitive-content-overlay.tsx @@ -2,7 +2,7 @@ import clsx from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { hideStatusMedia, revealStatusMedia, toggleStatusMediaHidden } from 'pl-fe/actions/statuses'; +import { hideStatusMedia, revealStatusMedia } from 'pl-fe/actions/statuses'; import { useAppDispatch, useSettings } from 'pl-fe/hooks'; import { Button, HStack, Text } from '../ui';