auth0
object as in Hooks.event
object.Type of Hook | Actions Trigger |
---|---|
Client Credentials Exchange | M2M/Client-Credentials |
Pre-User-Registration | Pre User Registration |
Post-User-Registration | Post User Registration |
Post-Change-Password | Post Change Password |
Send Phone Message | Send Phone Message |
event
object associated with the new Actions Trigger; you’ll see links to the relevant documentation when you get to the Change how data is accessed section later in this guide.
Type of Hook | Named Export |
---|---|
Client Credentials Exchange | onExecuteCredentialsExchange |
Pre-User Registration | onExecutePreUserRegistration |
Post-User Registration | onExecutePostUserRegistration |
Post-Change Password | onExecutePostChangePassword |
Send Phone Message | onExecuteSendPhoneMessage |
npm
Registry.
npm
modules are not on the latest version, this is a great time to get up to date!require
statements inside your Hook code.require
statements outside of the function
declaration.event
object. Many of the properties moved over as-is, but some have been combined to increase clarity.
Depending on the type of Hook you are converting, the event
object will change:
context
object, data stored on or modified in properties of the event
object does not persist in subsequent Actions. If your Hook is setting data on these properties to trigger core functionality, you will need to use the api
interface available in the Machine to Machine and Pre User Registration Actions Flows to persist data across Actions.callback()
function to complete its execution. Conversely, Actions do not use a callback mechanism; therefore, you will need to remove all instances of callback()
from your Actions function.
If you were previously using the callback()
function in a Client Credentials Exchange or Pre User Registration Hook to fail the request or update a user, you will still be able to do this in Actions through a new api
interface.