Skip to main content
The useAuthenticateWithOAuth hook handles the entire OAuth authentication flow — redirect, verification, session waiting, and wallet creation — in a single call. Supports Google, Apple, Discord, X, Facebook, Telegram, and Farcaster. On React Native, pass appScheme so the sign-in returns to your app, and open the URL passed to onOAuthUrl in an auth session browser (openAuthSessionAsync or InAppBrowser.openAuth) that closes when the page redirects to your app scheme. On Para’s updated authentication flow, onOAuthUrl is required, and a new user’s credential steps and a returning user’s passkey step happen while the call is pending. Use the useOAuthCredentialSteps hook from Social Login for those.

Import

Usage

For Telegram and Farcaster, see Social Login.
On Para’s updated authentication flow, the sign-in runs on a Para-hosted page published as authStateInfo.oauthUrl (Telegram and Farcaster included). On the web, open a blank popup in the click handler before calling this hook, then point it at oauthUrl from your para.onStatePhaseChange() listener. The same listener opens the passkey, password, or PIN creation page if a new account has to set one up. See OAuth Authentication for the full pattern.