From 8992d924940999e399d735188a638a61476a1d01 Mon Sep 17 00:00:00 2001 From: mihretue Date: Thu, 27 Aug 2026 13:42:18 +0000 Subject: [PATCH] feat(signup): present the Fayda proof after signup and skip the second OTP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The verify step now returns an encrypted verificationToken alongside the readable identity. After the existing signup succeeds, the page posts it to POST /profiles/me/fayda, which marks the phone verified when it is the one Fayda vouched for and fills the still-empty profile fields. Best-effort: the account already works if the call fails, and the token can be presented again. When the server confirms the phone, the page goes straight to the portal instead of /otp-verify — Fayda already verified that exact number with its own OTP, and asking for a second one on the same number is theatre. An applicant who edited the prefilled number still gets the normal OTP step. --- libs/auth/src/lib/pages/SignupPage.tsx | 27 ++++++++++++++++++++++-- libs/auth/src/lib/utils/fayda-session.ts | 8 +++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/libs/auth/src/lib/pages/SignupPage.tsx b/libs/auth/src/lib/pages/SignupPage.tsx index 29b03e6c8..3b41c45de 100644 --- a/libs/auth/src/lib/pages/SignupPage.tsx +++ b/libs/auth/src/lib/pages/SignupPage.tsx @@ -76,6 +76,7 @@ export function SignupPage() { transactionToken: string; expiresIn: number; }>(); + const [linkTrigger] = useApiMutation<{ phoneNumberVerified?: boolean }>(); const verified = (field: string) => fayda?.verifiedFields.includes(field) ?? false; const conflicted = (field: string) => fayda?.conflicts.includes(field) ?? false; @@ -89,8 +90,10 @@ export function SignupPage() { const faydaMark = (field: string): { description?: React.ReactNode } => { if (conflicted(field)) { return { + // component="span" on these badges: the description slot renders + // inside a

, where Badge's default

is invalid HTML. description: ( - + {t('fayda.fieldConflict', 'Already used by another account')} ), @@ -100,6 +103,7 @@ export function SignupPage() { return { description: (