NEAR Auth uses Auth0 on mainnet. Mainnet requires approved credentials, so apply for access to receive your Auth0 client id before shipping. You can develop against testnet first — see the NEAR Auth docs for testnet configuration.
- 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
Learn more
You’ve completed the full loop — login, key derivation, signature, and submission. Head to the NEAR Auth documentation for the SDK reference, protocol details, and going live on mainnet.NEAR Auth documentation
Full SDK reference, protocol concepts, and deployed contract addresses.
Apply for mainnet access
Request approved production credentials to launch on
fast-auth.near.