Skip to main content
The useVerifyNewAccount hook checks the code the user received via email or SMS. Call this after useSignUpOrLogIn returns an AuthStateVerify result. The code is what tells a new account from a returning one, so the result can have stage signup, login, or done. Email and phone sign-in now collects the code on a Para-hosted page (loginUrl / verificationUrl), so you only need this hook if your app still shows its own code input. See Email & Phone Login.

Import

Usage

Web apps don’t call this hook. On the web, the user enters the code on the Para-hosted code page at authStateInfo.verificationUrl. The hook applies to React Native apps that don’t set supportsAuthV2, when authPhase is awaiting_account_verification.
Sign-in doesn’t say whether an email or phone has an account until the user enters the code. So the result can be a returning account too. Check stage and handle login and done as well as signup. If the login requires two-factor authentication, the call resolves after the second factor.