feat(web): prepare the fluxer.com domain migration (#2952)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-25 13:43:34 +02:00
1 parent e62ae77643
commit 6730a242db
223 files changed
+13412 -2669

No files matched your search

@@ -1,6 +1,10 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import * as Modal from '@app/features/app/components/dialogs/Modal';
import {
PASSKEY_DOMAIN_UNSUPPORTED_DESCRIPTOR,
PasskeyDomainUnsupportedError,
} from '@app/features/auth/utils/WebAuthnUtils';
import {HttpError} from '@app/features/platform/types/EndpointError';
import {Button} from '@app/features/ui/button/Button';
import * as ModalCommands from '@app/features/ui/commands/ModalCommands';
@@ -43,6 +47,8 @@ export const PasskeyNameModal = observer(({onSubmit}: {onSubmit: (name: string)
} catch (error) {
if (error instanceof HttpError) {
FormUtils.handleError(i18n, form, error, 'name');
} else if (error instanceof PasskeyDomainUnsupportedError) {
form.setError('name', {type: 'server', message: i18n._(PASSKEY_DOMAIN_UNSUPPORTED_DESCRIPTOR)});
} else {
form.setError('name', {type: 'server', message: FormUtils.extractErrorMessage(i18n, error)});
}
@@ -126,6 +126,10 @@ const SudoVerificationModal: React.FC = observer(() => {
setWebAuthnError(i18n._(PASSKEYS_REQUIRE_A_SIGNED_MACOS_BUNDLE_WITH_A_DESCRIPTOR));
return;
}
if (err instanceof WebAuthnUtils.PasskeyDomainUnsupportedError) {
setWebAuthnError(i18n._(WebAuthnUtils.PASSKEY_DOMAIN_UNSUPPORTED_DESCRIPTOR));
return;
}
setWebAuthnError(i18n._(COULDN_T_VERIFY_WITH_PASSKEY_PLEASE_TRY_AGAIN_DESCRIPTOR));
}
};
@@ -26,6 +26,7 @@ import {
selectAuthorizePhase,
transitionAuthorizeSnapshot,
} from '@app/features/auth/components/pages/oauth_authorize_page/state/authorizeMachine';
import {getDefaultLandingPath} from '@app/features/navigation/utils/DefaultLandingUtils';
import type {BotPermissionOption} from '@app/features/permissions/utils/PermissionUtils';
import {http} from '@app/features/platform/transport/RestTransport';
import {failureMessage} from '@app/features/platform/utils/ResponseInspection';
@@ -425,7 +426,7 @@ export function useAuthorizeFlow(options: UseAuthorizeFlowOptions = {}): Authori
window.location.href = url.toString();
return;
}
window.location.href = '/';
window.location.href = getDefaultLandingPath();
} catch (err) {
logger.error('Failed to redirect on cancel', err);
setSubmitting(null);