Roll out a passkey enrollment prompt to 10% of users, then scale up based on results. Experiment Center allows you to start with 10% of users, observe what happens in tenant logs, and expand when you are confident.Documentation Index
Fetch the complete documentation index at: https://auth0-feat-experiment-center.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
To get started with the Experiment Center A/B test, you need:- An Auth0 development tenant
-
A Machine-to-Machine application with the following Management API scopes:
-
A
post_loginAction to deploy.
Step 1: Create the feature flag
Create a feature flag with a boolean parameter for passkey enrollment.feature_flag_id in the response (e.g., flg_4Yj9nR2mKpTw8vDsXc1hBq).
Step 2: Create two variations
Control variation
The control variation has empty overrides. Users assigned here see no passkey prompt.variation_id (e.g., var_2Bx5kH8pNmVj7qCsFw3gZr).
Treatment variation
The treatment variation enables the passkey prompt.variation_id (e.g., var_7Qr1sL6kMmWy9vBjPt4hEo).
Step 3: Activate the feature flag
A feature flag must be inactive status before its experiments can activate.
Step 4: Create the experiment
Create a percentage-allocation experiment with a 10/90 split. Thesubject: "device" setting means assignment uses a device-level identifier, giving cross-session consistency for pre-authentication flows.
experiment_id (e.g., exp_5Dt3wP8qXnYm2kRvJu6aCf).
Step 5: Validate and activate the experiment
Validate first:{ "is_valid": true, "errors": [] }. Fix any listed errors before proceeding.
Then activate:
event.experiment metadata on every auth transaction.
Step 6: Write the post_login Action
This Action reads event.experiment and conditionally initiates passkey enrollment for treatment users.
- Control users (
passkey_enabled: false): Action returns immediately; standard login flow continues - Treatment users (
passkey_enabled: true): Action redirects to your passkey enrollment page after login
experiment_id and variation_id passed in the query string let your enrollment page record which experiment drove the enrollment event. This helps you correlate passkey enrollments with the experiment in your analytics tool.
Deploy the Action to your development tenant and set it as the post_login trigger.
Step 7: Trigger test logins and observe
Run test logins through your test tenant. Some logins (approximately 10%) will be redirected to your passkey enrollment page; the rest will complete normally. Open your tenant logs (Auth0 Dashboard > Monitoring > Logs). Find a successful login event (type: "s") and confirm it includes details.experiment:
Confirm results
Run enough test logins to verify both paths work:- Approximately 10% of login events show
variation_id: var_7Qr1sL6kMmWy9vBjPt4hEo(treatment; passkey prompt shown) - Approximately 90% show
variation_id: var_2Bx5kH8pNmVj7qCsFw3gZr(control; standard login) - The same test device consistently receives the same variation across multiple logins (deterministic assignment)
- Treatment logins are redirected to your enrollment page; control logins complete normally
Ramp up: move to a higher percentage
When you are ready to expand the rollout, you have two options. Option 1: Pause and update allocations You cannot modify allocations on an active experiment. Pause first, update the weights, then reactivate:experiment_id so the hash produces a different bucket assignment.
Beta limitation: Only one experiment can be active per tenant at a time. You must complete or pause the current experiment before activating a new one.
Analyze results
Pull enriched tenant log events from your analytics tool and compare outcomes across variation groups. A typical analysis:- Count
type: "s"(successful login) events grouped byexperiment.variation_id - Count passkey enrollment completion events from your enrollment page, grouped by
variation_idpassed in the query string - Compute passkey enrollment rate per variation:
(enrollments / logins) * 100 - If the treatment shows a meaningfully higher enrollment rate without a drop in login success rate, the feature is ready to roll out more broadly