Interacting with external systems

Some authentication workflows require the user to do something in another system, such as clicking a magic link in their email or verifying a document in a mobile app. The Flow Conductor connector simplifies these cases by allowing you to generate the magic link and create a challenge variable that‘s resolved when the link is clicked. For more information about challenges, see the Challenge connector.

The Flow Conductor also allows you to create a secondary path in your flow that's triggered when the magic link is clicked:

  1. In your main flow, a Flow Conductor Out-of-Band Start (Links Only) node generates a magic link or QR code. You can send this link to the user by email, SMS, or another method of your choice. This node also creates the challenge, which gives an HTTP connector the ability to pause the flow until the status of the challenge changes.
  2. When the user clicks the magic link, an Out-of-Band Continue node starts a secondary flow. You can use this flow to show a confirmation message, and to trigger the main flow to continue by updating the status of the challenge.

The Start and Continue nodes work as a pair, and they are always attached to the same parent node. DaVinci automatically follows the Start node first and activates the Continue node when the user clicks the magic link that contains the matching challenge ID.

Links to subflows

By linking to subflows, you can simplify visually complex flows by breaking them into smaller components. You can also link to a subflow from as many main flows as you want, so this is a powerful way to centralize your maintenance work.

Subflows are best used for frequently-used groups of nodes that serve a specific purpose. For example, you might create a subflow for registering a multi-factor authentication (MFA) device or letting a user reset their password. Then you could include these in several of your main flows, such as your registration, authentication, and user self-service portal experiences.

Setup

Setting up the Flow Conductor connector configuration

In DaVinci, add a Flow Conductor connection. For help, see Adding a connector.

Connector configuration

Input Schema

When you call on this subflow, it will receive information from your main flow. The input schema defines the structure of that information. For help, see JSON-Schema.org.

Public Key

To make sure the flow is only called by an authorized source, enter your public encryption key here.

Enforce Signed Token
Turn this on to require that the token is signed.

Using the connector in a flow

Emailing a magic link to a user, then continuing the flow


A screen capture that shows how the Flow Conductor branches a registration flow.

When a guest registers a new user account, you can verify that they own the email address that they entered. We want to pause our main flow until the user clicks the link in their email inbox. We also want to show them a confirmation message in a new browser tab when they click the link. After they click the magic link, our secondary flow will trigger our main flow to bring the user to the User Account Portal.

For this flow, you’ll need:

  • A registration form in your flow, made using the HTTP connector.

  • A way to send an email to the user, such as the SMTP connector.

  • A Challenge connector available in your environment.

  1. Generate the magic link and the challenge:
    1. In your flow, following the registration form, add the Flow Conductor connector, and select the Out-of-Band Start (Links only) capability. Select the node that appears in your flow.
    2. In our case, we want to send a text link rather than a QR code, so we’ll leave Generate QR Code turned off.
    3. In the Challenge Length field, you can customize the length of the challenge ID. This is a number that DaVinci generates to keep track of this challenge. We’ll refer to this ID elsewhere in our flow, but we don’t need to know the number. Leave it as the default of 32.
    4. In the Challenge Expiry field, specify how long you want the flow to wait before timing out.
    5. It won’t take the user long to click a magic link, but if your flow has the user taking photos of their drivers license for identity verification, you should give them more time.
    6. We’re sending a normal link to the user, so we’ll leave Use Custom Link turned off.
    7. You can turn this on in your own flow if you need to customize the URL to point to a mobile app. To customize the URL, point to your equivalent of com.myApp://skSKD?challenge=.
  2. Send the magic link to the user:
    1. Following your Out-of-Band Start node, add an SMTP connector and select the Send Email capability. Select the node that appears in your flow.
    2. In the To Email Address field, select the email address variable from your registration form.
    3. In the HTML Message field, include a hyperlink. For the href part of the link, click {} and select the continueLink variable from your Flow Conductor node.