Select your SDK
FastAuth provides two SDKs tailored for different frontend frameworks:
| SDK | Package | Use Case |
|---|---|---|
| Browser SDK | @fast-auth-near/browser-sdk | Vanilla JavaScript, Vue, Svelte, or any web framework |
| React SDK | @fast-auth-near/react-sdk | React applications with hooks and context providers |
Browser SDK
The Browser SDK provides a framework-agnostic FastAuthClient class that works with any JavaScript application. Use this if:
- You're building with vanilla JavaScript, TypeScript, Vue, Svelte, or Angular.
- You need full control over the authentication flow.
- You prefer a class-based API.
npm install @fast-auth-near/browser-sdk
For detailed documentation, see the Browser SDK Getting Started and Browser SDK Client API.
React SDK
The React SDK wraps the Browser SDK with React-specific features like hooks and context providers. Use this if:
- You're building a React application.
- You want to use hooks like
useFastAuth(),useIsLoggedIn(), anduseSigner(). - You prefer declarative state management.
npm install @fast-auth-near/react-sdk
For detailed documentation, see the React SDK Getting Started, React SDK Client API, and React SDK Hooks for hooks usage.