Bot detection (reCAPTCHA)
The internet is full of bots, and they often attempt to sign up or log in to apps. Frontegg helps you protect your application with bot detection. By default, Frontegg uses proprietary algorithms, but we also support Google reCAPTCHA, allowing you to adjust your bot detection strictness.
Once you select your bot detection method, you can configure whether authentication attempts identified as bots are allowed, challenged, blocked, or locked.
Prerequisites
Prerequisites
There are no prerequisites for Frontegg's bot detection. However, to use Google reCAPTCHA, you’ll need to set up an account and obtain a site key and secret.
Configuring bot detection
We offer two bot detection options: Frontegg Bot Detection and Google reCAPTCHA.
Frontegg bot detection
Frontegg Bot Detection requires no setup. Simply select the action to take when a bot is detected:
- Allow: Allow bots to continue to your app.
- Challenge: Require MFA verification.
- Block: Deny bots access to your app.
- Lock: Lock users who are detected as bots.
Google reCAPTCHA
Setting up reCAPTCHA
To set up reCAPTCHA v3:
Obtain your Site Key and Secret Key:
- Fill in the label.
- Select reCAPTCHA v3.
- Add your domain.
- Accept the reCAPTCHA Terms of Service.
- Submit and copy the provided keys.
In the Frontegg portal:
- Paste your Site Key and Secret Key.
- Choose a Minimum Passing Score (0.0 to 1.0). Higher scores indicate higher likelihoods of being human, so setting a minimum closer to 1.0 enforces stricter security.
To save your reCAPTCHA settings, click Save.
With reCAPTCHA enabled, bot detection will be active in your Frontegg app. Choose an action to take when a bot fails the threshold:
- Allow: Detect and log bots but allow them access.
- Challenge: Require MFA for bots.
- Block: Deny bots access to the app.
- Lock: Lock users who are detected as bots.
Let trusted emails bypass bot detection
To allow certain test users to bypass bot detection:
- Open the Frontegg portal.
- Navigate to: [ENVIRONMENT] → Configurations → Security → Security Rules**.
- Click the Manage button in the Bot detection section.
- In the window that opens, add test emails to the Ignored Emails list for both Frontegg Bot Detection and reCAPTCHA, then save your changes.
Notifying end users of bot detections
To notify end users each time their email triggers a bot detection (regardless of action):
- Enable notifications by selecting the Send email on bot detection checkbox.
Analyzing bots in your app
- Go to Analytics ➜ Security Events in the Frontegg portal to view bot activity over time.
- To read more about Security Events, click here.
Unlock account email
Prerequisites
Prerequisites
To enable account unlock emails for users, ensure you’re using the following versions:
@frontegg/react@7.0.1
@frontegg/nextjs@9.0.1
@frontegg/angular@7.1.0
@frontegg/vue@4.0.1
- Enable the Send unlock account email option. This feature sends an email to users allowing them to restore account access.
Unlock account and unlock account success templates
Unlock account and unlock account success templates
Once you’ve enabled Send unlock account email:
- Open the Frontegg portal.
- Go to [ENVIRONMENT] → Configurations → Authentication → Emails.
- Enable the Unlock account email template.
- Optionally, enable the Unlock account success email template to notify users when their account is unlocked.