Everything on this page uses the Auth0 login path on mainnet. Use the Auth0 client id you receive after applying, the NEAR Auth contract lives at
fast-auth.near, and the MPC signer is v1.signer.- React
- Browser / JS
- React Native
Initialize the provider (mainnet)
Create a
JavascriptProvider for mainnet with your client id, connect to the mainnet RPC, and wrap your app in FastAuthProvider. The provider fills in the correct Auth0 domain and signing audience for mainnet automatically.App.tsx
FastAuthProvider builds a relayer-aware FastAuthClient under the hood, pointed at fast-auth.near and v1.signer. You reach it through the hooks below.Log the user in
Grab the client with
useFastAuth, check status with useIsLoggedIn, and call login() to open the Auth0 flow.LoginButton.tsx
Get a signer and read the public key
Once the user is authenticated, obtain a signer and read the NEAR public key derived for their identity. The
usePublicKey hook returns the key directly, or you can pull a signer yourself with useSigner.AccountInfo.tsx
Request a signature and complete the flow
Build a transfer, request the signature (this triggers an Auth0 approval), then let the relayer-backed signer submit it. In the React SDK the signer exposes
signAndSendTransaction, which requests the signature, calls the NEAR Auth contract, and broadcasts the result for you.Transfer.tsx
Next steps
You’ve completed the full loop — login, key derivation, signature, and submission. Go deeper on each part, then take it live.Authenticate your users
Login, logout, session checks, and handling the Auth0 popup vs. redirect flows.
Sign transactions
The full signature round-trip, delegate actions, and gasless relayer submission.
Go to production
Apply for approved mainnet credentials to launch your app on
fast-auth.near.