Disable Context Object in Custom Database Scripts
Last Updated:
Overview
Applies To
- Auth0 Database Scripts
- Auth0 Custom Scripts
- Auth0 Context Object
Cause
Solution
Avoiding the Context Object:
- The context object is only passed to script functions that have the expected number of parameters. If the function signature is not updated to include the context parameter, the context object will not be passed to the script.
Function Signature:
- Original function signature without context:
function login(email, password, callback) {
// Your logic here
}
- Updated function signature with context:
function login(email, password, context, callback) {
// Your logic here
}
Step to Ensure Context is Not Used:
- Do not update the function signatures to include the context parameter if the context object should not be used in the scripts.
By following these guidelines, it is ensured that the context object is not utilized in the database scripts, effectively disabling its impact.