Deploy and Enable Actions Using Auth0 Deploy CLI

Overview

When using Auth0 CLI to deploy Actions, they are getting deployed but not bound to the flow and run. For example, the following YAML code is run using Auth0 Deploy CLI. 

# Auth0-Deploy-CLI Tenant YAML Configuration

actions:
  - name: action-example
    code: ./actions/action-example/code.js
    dependencies:
      - name: lodash
        version: 4.17.21
    deployed: true
    status: built
    supported_triggers:
      - id: post-login
        version: v2

 

This article explains how to deploy the Actions using Auth0-cli. 

Applies To

  • Auth0 Deploy CLI

Solution

The solution is to also update the trigger bindings using the Auth0 Deploy CLI. This can be done within the Auth0 Deploy CLI configuration. Here is a full example:
 
# Auth0-Deploy-CLI Tenant YAML Configuration

actions:
  - name: action-example
    code: ./actions/action-example/code.js
    dependencies:
      - name: lodash
        version: 4.17.21
    deployed: true
    status: built
    supported_triggers:
      - id: post-login
        version: v2

triggers:
  post-login:
    - action_name: action-example
      display_name: action-example

Recommended content

No recommended content found...