From 21d38bbf9ad4f7d0e8268cf9cbf341fc02f71a05 Mon Sep 17 00:00:00 2001 From: janicelichtman Date: Tue, 31 Mar 2026 12:46:29 -0400 Subject: [PATCH] fixing race condition on phone number authentication --- components/EditProfilePage/PhoneVerificationModal.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/EditProfilePage/PhoneVerificationModal.tsx b/components/EditProfilePage/PhoneVerificationModal.tsx index 718dbc299..a08c78370 100644 --- a/components/EditProfilePage/PhoneVerificationModal.tsx +++ b/components/EditProfilePage/PhoneVerificationModal.tsx @@ -130,6 +130,10 @@ export default function PhoneVerificationModal({ setVerifying(true) try { await confirmationResult.confirm(code.trim()) + + // Force fresh token to ensure context.auth is populated + await auth.currentUser?.getIdToken(true) + if (completePhoneVerification.execute) { await completePhoneVerification.execute() }