I’m using Auth0 for authentication. I’m trying to find currentUser.email field. I want to save this email for potential future migration. It looks like the object does not have the email field. Here’s an example data for currentUser:
@peterp thanks very much. I figured it out now. It is confusing as the rule needs to be added inside Auth0 Auth Pipeline. I was trying to add it into getCurrentUser function.
Beginning on October 16, 2023, Rules and Hooks functionality will not be present in newly-created tenants. Any tenants created before this date will continue to have access to Rules and Hooks until the EOL date of November 18, 2024.
The way to resolve this using Auth0 provider would be using Actions.
Log in to the Auth0 Management Dashboard (https://manage.auth0.com) and navigate to your Auth0 tenant.
In the left-hand sidebar, click on “Actions > Flows > Login” to access the Actions dashboard.
Click on the “+ New Action” button to create a new Action.
Give the Action a meaningful name, such as “Add email”
In the Action editor, paste the following code: