Skip to main content
NEAR Auth ships as a small family of TypeScript packages. An SDK gives you the FastAuthClient and FastAuthSigner classes that log users in and turn NEAR transactions into MPC-backed signatures. A provider is the platform adapter that actually talks to Auth0 — one for the web, one for React Native. You pick one SDK for your framework and one provider for your platform, and compose them. Everything is published under the @fast-auth-near/* scope on npm and lives in github.com/Peersyst/fast-auth.

The packages at a glance

PackageLayerPlatformWhen to use
@fast-auth-near/react-sdkSDKReact (web)React apps — provider component plus useFastAuth, useSigner, useIsLoggedIn, usePublicKey hooks and a relayer-aware client.
@fast-auth-near/browser-sdkSDKAny web frameworkVanilla JS, Vue, Svelte, Angular — the framework-agnostic FastAuthClient / FastAuthSigner classes.
@fast-auth-near/javascript-providerProviderWeb browsersPair with either web SDK to run the Auth0 flow via popup or redirect.
@fast-auth-near/react-native-providerProvideriOS & AndroidPair with the React SDK to run the Auth0 flow with native mobile screens.
@shared/coreCoreSharedInternal shared types — IFastAuthProvider, SignatureRequest, User, and network defaults consumed by every package.

React SDK

FastAuthProvider, hooks, and the relayer-backed signer for React apps.

Browser SDK

The framework-agnostic FastAuthClient and FastAuthSigner classes.

JavaScript Provider

JavascriptProvider — the Auth0 adapter for web, popup or redirect.

React Native Provider

ReactNativeProvider — the Auth0 adapter for iOS and Android.

Core Types

IFastAuthProvider, SignatureRequest, and the shared type surface.

The SDK + provider composition model

NEAR Auth splits what to do from how to authenticate. The SDK owns the NEAR-facing work — deriving the user’s public key, building transactions, requesting MPC signatures, and (in the React SDK) coordinating a relayer. The provider owns the identity work — opening the Auth0 login screen, holding the session, and embedding the encoded transaction into the JWT the guard contract verifies on-chain. The two meet at a single contract: every provider implements the IFastAuthProvider interface from @shared/core.
IFastAuthProvider
export interface IFastAuthProvider {
  login(...args: any[]): Promise<LoginResponse>;
  logout(...args: any[]): Promise<void>;
  isLoggedIn(): Promise<boolean>;
  requestTransactionSignature(...args: any[]): Promise<RequestTransactionSignatureResponse>;
  requestDelegateActionSignature(...args: any[]): Promise<RequestDelegateActionSignatureResponse>;
  getSignatureRequest(): Promise<GetSignatureRequestResponse>;
  getPath(): Promise<string>;
}
Because the SDK only depends on this interface, swapping platforms is a matter of swapping the provider you pass in. You construct a provider, hand it to the SDK, and the rest of your code is identical across web and mobile.
import { FastAuthClient } from "@fast-auth-near/browser-sdk";
import { JavascriptProvider } from "@fast-auth-near/javascript-provider";

// 1. Build a provider for your platform (web = JavascriptProvider).
const provider = new JavascriptProvider({
  network: "testnet",
  clientId: "your-auth0-client-id",
});

// 2. Hand it to the SDK. The client only knows IFastAuthProvider.
const client = new FastAuthClient(provider, connection, {
  fastAuthContractId: "fast-auth.testnet",
  mpcContractId: "v1.signer-prod.testnet",
});

await client.login();
const signer = await client.getSigner();
A provider carries the authentication flow; an SDK carries the NEAR flow. You always need one of each — one SDK for your framework and one provider for your platform.

Which combination fits your stack

Use the React SDK with the JavaScript provider. You get the FastAuthProvider context, hooks, and a relayer-backed signer that exposes signAndSendTransaction(...) and signAndSendDelegateAction(...).
npm install @fast-auth-near/react-sdk @fast-auth-near/javascript-provider near-api-js
Not sure yet? The choose your SDK guide walks through the decision for your framework and platform.

Providers beyond Auth0

Auth0 is the default identity provider across NEAR Auth, and both the JavaScript and React Native providers use it out of the box. Other identity setups — such as a custom issuer — are handled at the protocol layer by dedicated guard contracts rather than by these SDKs.
Non-Auth0 identity setups are an advanced path with their own guard contract and key-management model. They are covered under Protocol → Advanced, not here.

Next steps

Quickstart

Log in and sign a testnet transaction in under five minutes.

Authenticate your users

Login, logout, and session handling with the SDK of your choice.

Sign transactions

Request signatures and submit NEAR transactions, optionally gasless.

How it works

The end-to-end Auth0 flow, from JWT to MPC signature.