Overview
The Fortt React SDK provides components and hooks to integrate Fortt into your React or Next.js application. All backend API communication is handled automatically—you only need to work with the React components and hooks.Components
<ForttProvider />
The main provider component that wraps your application and enables Fortt functionality. It automatically handles page view tracking and provides Fortt context to all child components.
Props
Your unique Fortt project identifier. This is required to connect your
application to your Fortt project. Getting your projectId: To start your
trial and receive your
projectId, contact
rafael@fortt.sh. You’ll receive your project
identifier after starting your trial.The child components that will have access to the Fortt context. Typically,
this is your entire application or a portion that needs protection.
Array of path patterns to skip automatic verification on. Supports exact
matches and wildcard patterns. When a page matches any pattern in this array,
Fortt will not automatically send verification requests on page load.
Pattern Examples: -
'/dashboard' - Exact match for /dashboard -
'/admin/*' - Matches /admin and all subpaths like /admin/users,
/admin/settings, etc. This is useful for excluding internal pages, admin
panels, or dashboard pages where you don’t want automatic verification to
occur.Example
Behavior
WhenForttProvider is mounted, it automatically:
- Initializes device fingerprinting
- Creates or retrieves visitor and session identifiers
- Sends verification requests on page load
- Manages all API communication in the background
Hooks
Additional hooks for protecting specific actions will be available soon. Currently,ForttProvider handles all verification automatically through page view tracking.
Next Steps
- Check out the quickstart guide to integrate Fortt into your app
- Visit the FAQ for common questions about integration and usage