Client Trust
Client Trust is Clerk's defense against credential stuffing attacks - a type of attack where bad actors use lists of stolen passwords to attempt to gain unauthorized access to user accounts.
When Client Trust is enabled, Clerk treats every new device as untrusted until the user has verified their identity with a .
How Client Trust works
Client Trust automatically requires a when all of the following conditions are met:
- The user enters a valid password.
- The user hasn't enabled multi-factor authentication (MFA).
- The user is signing in from a new device.
When these conditions are met, Clerk uses an email code, SMS code, or email link based on your settings. The user must complete this verification to finish the sign-in process.
Enable Client Trust
Client Trust is automatically enabled for Clerk applications created after November 14, 2025. For applications created before this date, you can enable Client Trust in the Clerk Dashboard:
- In the Clerk Dashboard, navigate to the Attack protection page.
- Enable Client Trust.
How Client Trust differs from traditional MFA
Impact on custom sign-in flows
If you've built a that allows password-based sign-ins using the Clerk API or SDKs, you'll need to handle the needs_client_trust status that Client Trust can trigger.
When Client Trust requires verification, the sign-in attempt will return a status of needs_client_trust with email_code, phone_code, or email_link in the supportedSecondFactors array. Your flow should:
- Check if the sign-in status is
needs_client_trust. - Check if
email_code,phone_code, oremail_linkis in thesupportedSecondFactorsarray. - Call
prepareSecondFactor()for the selected strategy. - Complete the selected strategy's verification.
- If successful, set the session as active.
For a complete implementation example, see the email/password custom flow guide.
Limitations
- Password-only: Client Trust only applies to password-based sign-ins. Passwordless authentication methods (such as email link sign-ins, , passkeys, and OAuth) are not affected.
- Email/Phone number required: Client Trust requires the user to have a verified email address or phone number to receive the verification.
Feedback
Last updated on