I am following a tutorial on authentication in Node.js using Auth0 but in the instructions it says this:
Auth0 Rules are JavaScript functions that execute when a user logs in to your application. They run once the authentication process is complete, and you can use them to customize and extend Auth0’s capabilities. For security, your Rules code executes in a sandbox, isolated from the code of other Auth0 tenants.
You can create Auth0 Rules easily using the Auth0 Dashboard. Follow these steps to create a rule that adds user roles to tokens:
- Open the Rules page from the Auth0 Dashboard
- Click on the Create Rule button.
- Click on the Empty Rule option.
- Provide a Name to your rule, such as “Add user roles to tokens”.
- Next, replace the content of the Script section with the following function:
Now that rules are deprecated how would I do this?