From dc4508999f76b3840caca2b5ce4ec9f3ff930e5e Mon Sep 17 00:00:00 2001 From: Gildas Garcia <1122076+djhi@users.noreply.github.com> Date: Mon, 5 Oct 2026 15:55:59 +0200 Subject: [PATCH] improve feature check on authorize page --- apps/studio/pages/authorize.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/studio/pages/authorize.tsx b/apps/studio/pages/authorize.tsx index ffb7b0ac5c0..af05b04c76b 100644 --- a/apps/studio/pages/authorize.tsx +++ b/apps/studio/pages/authorize.tsx @@ -33,6 +33,7 @@ const APIAuthorizationPage: NextPageWithLayout = () => { const routerReady = router.isReady const { auth_id, organization_slug, mock_scenario } = useParams() const oauthAppScopedGrants = useFlag('OauthAppScopedGrants') + const isScopedOAuthFlowEnabled = oauthAppScopedGrants && USE_MOCKS const mockScenario = USE_MOCKS ? (MOCK_SCENARIOS[mock_scenario ?? 'default'] ?? MOCK_SCENARIOS.default) @@ -45,7 +46,7 @@ const APIAuthorizationPage: NextPageWithLayout = () => { const { data: request } = useOAuthAppsAuthorizeRequestQuery( { id: authId }, - { enabled: oauthAppScopedGrants } + { enabled: isScopedOAuthFlowEnabled } ) if (!routerReady) { @@ -59,7 +60,7 @@ const APIAuthorizationPage: NextPageWithLayout = () => { ) } - if (oauthAppScopedGrants) { + if (isScopedOAuthFlowEnabled) { if (!authId || !request) { return ( <>