I encountered an issue while using Auth0 with a custom database. When testing the custom database scripts, everything works as expected. Deleting a user via the Auth0 dashboard also works perfectly. However, when I attempt to delete a user using the Management API, I receive the following error: Request to Webtask exceeded allowed execution time.
Upon investigating the logs, I noticed that the delete user endpoint in my script is only accessed after the error is thrown.
Could you please help me identify what might be causing this issue? Specifically:
Why is the delete user endpoint not called immediately?
How can I ensure the script executes within the allowed time limit?
If the issue persists, you could consider implementing a queue-based system for user deletion, where the Management API triggers a deletion request that gets processed asynchronously, though this would require additional infrastructure.