From 766ad0ed0ec65e513898d191446879d4b26f9f3c Mon Sep 17 00:00:00 2001 From: dschom Date: Tue, 9 Jul 2024 17:56:58 -0700 Subject: [PATCH] bug(settings): Skip checkOauthData for sync Because: - We can hit a state where firefox will direct a user to sign in and the redirect uri, or client id won't be present - This state is erroneous, but it'll take a bit for the fix in FF to be released. This Commit: - shortCircuits checkOauthData when we are dealing with a sync integration. - Sync doesn't need to redirect back to a third party anyway, so this is probably okay. --- packages/fxa-settings/src/lib/oauth/hooks.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/fxa-settings/src/lib/oauth/hooks.tsx b/packages/fxa-settings/src/lib/oauth/hooks.tsx index ab8660b1f0..1380a9e019 100644 --- a/packages/fxa-settings/src/lib/oauth/hooks.tsx +++ b/packages/fxa-settings/src/lib/oauth/hooks.tsx @@ -39,6 +39,11 @@ export type FinishOAuthFlowHandlerResult = | FinishOAuthFlowHandlerError; const checkOAuthData = (integration: OAuthIntegration): AuthError | null => { + // Weird edge case. See FXA-10029... + if (integration.isSync()) { + return null; + } + // Ensure a redirect was provided or matched. Without this info, we can't relay the // oauth code and state on a redirect! // clientInfo?.redirectUri has already validated the redirect_uri query param