feat(auth): add MFA handling in team invitations flow (#285)
- Export `MultiFactorAuthError` from `require-user` for reuse. - Implement MFA handling during team invitations' sign-in flow. - Add E2E test for team invitation flow with MFA. - Update components to improve i18n translation handling.
This commit is contained in:
committed by
GitHub
parent
698e570545
commit
1032fb7f94
@@ -13,6 +13,7 @@ import { If } from '@kit/ui/if';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import { useLastAuthMethod } from '../hooks/use-last-auth-method';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
interface ExistingAccountHintProps {
|
||||
signInPath?: string;
|
||||
@@ -35,6 +36,7 @@ export function ExistingAccountHintImpl({
|
||||
useLastAuthMethod();
|
||||
|
||||
const params = useSearchParams();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const isInvite = params.get('invite_token');
|
||||
|
||||
@@ -78,7 +80,7 @@ export function ExistingAccountHintImpl({
|
||||
<AlertDescription>
|
||||
<Trans
|
||||
i18nKey="auth:existingAccountHint"
|
||||
values={{ method: methodDescription }}
|
||||
values={{ method: t(methodDescription) }}
|
||||
components={{
|
||||
method: <span className="font-medium" />,
|
||||
signInLink: (
|
||||
|
||||
Reference in New Issue
Block a user