diff --git a/apps/edr-passenger-web/portal/src/app/booking/passengers/page.tsx b/apps/edr-passenger-web/portal/src/app/booking/passengers/page.tsx index 7dccc7bdf..b29a4b102 100644 --- a/apps/edr-passenger-web/portal/src/app/booking/passengers/page.tsx +++ b/apps/edr-passenger-web/portal/src/app/booking/passengers/page.tsx @@ -685,6 +685,19 @@ function PassengersForm() { const { user, isAuthenticated, updateUser } = useAuthStore(); const isInitialized = useAuthStore((s) => s.isInitialized); const [faydaEnabled, setFaydaEnabled] = useState(true); + // "Skip for now" (bypasses Fayda verification) is only offered on local dev and the + // staging/test domain — never on an unrecognized host, which would include production. + // Starts false (matches SSR, where window isn't available) and is only ever flipped to + // true client-side after mount, so there's no server/client hydration mismatch. + const [allowSkipFaydaVerification, setAllowSkipFaydaVerification] = useState(false); + useEffect(() => { + const hostname = window.location.hostname; + setAllowSkipFaydaVerification( + hostname === "localhost" || + hostname === "127.0.0.1" || + hostname === "edrpassenger.triaplc.com", + ); + }, []); const [verificationStatus, setVerificationStatus] = useState>({}); const [faydaErrors, setFaydaErrors] = useState>({}); // The passenger currently mid-verification (popup open / awaiting callback). Only one @@ -1166,14 +1179,16 @@ function PassengersForm() { Finish verifying Passenger {(verifyingIndex ?? 0) + 1} first

)} - {/* */} + {allowSkipFaydaVerification && ( + + )} ) : showManualEntryLink ? (