Test individual Actions
You can test individual Actions using the Actions Code Editor. The editor’s test capability simulates a call to the Action using a sample payload based on the flow with which the Action is associated. To test an individual Action:- Navigate to Auth0 Dashboard > Actions, and choose the Flow and Action that you would like to edit.
- Locate the Actions Code Editor, and select Test (the play icon) from its sidebar. Edit the payload in the Test sidebar to analyze the outcome of different payloads.
- Select Run.

You can also test an Action using the Management API’s Test an Action endpoint and providing a payload corresponding with the flow with which the Action is associated. To get a sample payload, test the Action using the Test capability of the Actions Code Editor.
Debug deployed Actions
Now that you have tested your Action, it’s time to deploy it and observe its execution. Assuming you have deployed your Action and added it to a flow (to learn how to attach Actions to Flows, read the “Attach the Action to a flow” section in Write Your First Action), you can debug your live Action in a few steps.Verify end-to-end Login Flow
For apost-login
Action, you can verify the end-to-end-login flow by executing a login attempt for your tenant:
- Navigate to Auth0 Dashboard > Authentication > Authentication Profile, and select Try. A window containing a sample login will open.
- Proceed through the login flow. The login flow will execute any configured Actions.
Analyze tenant logs
Whenever a trigger executes that has an associated Action bound to its flow, your tenant logs will include Action execution details. In the tenant logs list, you can see logs associated with Actions and choose to view them. In the example below, the log type ofSuccess Login
is associated with an Action on the post-login
trigger of this tenant.

Name | Trigger(s) |
---|---|
Success Login | post-login |
Failed Login | post-login |
Success Exchange | post-login |
Failed Exchange | post-login |
Success Change Password | post-change-password |
Failed Change Password | post-change-password |
Successful Signup | pre-user-registration |
Failed Signup | pre-user-registration |
Success Exchange | credentials-exchange |
Failed Exchange | credentials-exchange |

Unit test Actions
You can unit test your Auth0 Actions by mocking the event and api passed into your Action function. Your Actions can live in version control or local directory, and you can use a tool like Jest to automatically test your Actions. In the following example, we use the Login / Post Login trigger and Jest to mock and test. Action code:Best practices
When building Actions on Auth0, we recommend that you create a dedicated Auth0 tenant per environment. Doing so allows you to isolate your production user base from your other environments, as well as configure different administrators per environment (for example, engineers might not have access to production configuration).If you wish to entirely manage, test, and deploy your Actions via a CLI or CI/CD pipeline, you can use the Deploy CLI Tool.