Get started with Protect
Before you enable protections on the Protections page, your application must meet the following requirements.
Requirements
- ClerkJS 6.39.0 or later - Clerk's SDKs load the latest version by default. If you bundle or host
@clerk/clerk-jsyourself, update it. To check your version, runwindow.Clerk.versionin your browser's console. - Content Security Policy - If your application sets one, add Clerk's CSP headers.
- Custom flows - If your application uses custom authentication flows, they need to handle new error messages and display challenges.
- Current bot protection - Older applications might use legacy bot sign-up protection and need to update to Challenge suspicious sign-ups.
Enable protections
In the Clerk Dashboard, navigate to Protections or Sign-in security under Protect, depending on the protection you want to configure. See Protections or Sign-in security for a description of what each page offers.
Each instance has separate protection settings. For protections on the Protections page, test the sign-up and sign-in flows they affect in development without a Testing Token, review any Protect events in Application Logs, then use the same settings in your production instance.
Native API considerations
Clerk's native SDKs for iOS, Android, and Expo require the Native API to be enabled and don't support challenges yet.
- Protections configured to challenge will allow attempts from native environments without a challenge.
- Protections configured to block still apply to native environments.
- Require Device Intelligence checks and Require a minimum ClerkJS version apply to browsers only, so native environments skip them.
Because the Native API is public, attackers can also use it to bypass challenge-based protections. Only enable it if your application requires it. When the Native API is disabled, Clerk rejects requests from native applications with a native_api_disabled error.
Bypass protections in tests
Testing Tokens let automated tests skip the protections that block or challenge. That includes Require Device Intelligence checks, so a browser test that uses one isn't blocked when it can't run Device Intelligence.
Feedback
Last updated on