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.
This commit is contained in:
dschom 2024-07-09 17:56:58 -07:00
Родитель 862edbb9b6
Коммит 766ad0ed0e
Не найден ключ, соответствующий данной подписи
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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