npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@quickguidehealth/connector-logto-novu

v0.1.3

Published

Logto email connector that integrates with Novu for passwordless authentication flows

Readme

Logto Connector: Novu Email

npm version License: MIT

A Logto email connector that integrates with Novu to send verification codes during user authentication flows.

Features

  • 🔐 Passwordless email authentication via Novu
  • 📧 Support for all Logto email flows:
    • User Registration
    • Sign In
    • Password Recovery
    • Continue Flow
    • Generic Verification
  • 🎨 Flexible workflow configuration
  • ⚡ Built with TypeScript and Zod validation
  • 🌍 Multi-language support

Installation

npm install @quickguidehealth/connector-logto-novu

Prerequisites

Before using this connector, you need:

  1. A Novu account with an API key
  2. Configured Novu workflows for each authentication flow you want to support
  3. A running Logto instance

Configuration

Step 1: Create Novu Workflows

In your Novu dashboard, create workflows for each authentication flow. Each workflow should:

  • Have an Email step configured
  • Accept a code payload variable
  • Be published and active

Example workflow configuration:

  • Trigger Identifier: user-registration-verification
  • Email Template: Include {{code}} where the verification code should appear

Step 2: Configure the Connector in Logto

When setting up the connector in your Logto Admin Console, use the following JSON configuration format:

{
  "secretKey": "your-novu-secret-key",
  "serverUrl": "https://eu.api.novu.co",
  "templates": [
    {
      "usageType": "Register",
      "workflowId": "user-registration-verification",
      "workflowName": "User Registration"
    },
    {
      "usageType": "SignIn",
      "workflowId": "user-signin-verification",
      "workflowName": "User Sign In"
    },
    {
      "usageType": "ForgotPassword",
      "workflowId": "password-recovery-verification",
      "workflowName": "Password Recovery"
    },
    {
      "usageType": "Generic",
      "workflowId": "generic-verification",
      "workflowName": "Generic Verification"
    },
    {
      "usageType": "OrganizationInvitation",
      "workflowId": "org-invitation",
      "workflowName": "Organization Invitation"
    },
    {
      "usageType": "UserPermissionValidation",
      "workflowId": "permission-validation",
      "workflowName": "Permission Validation"
    },
    {
      "usageType": "BindNewIdentifier",
      "workflowId": "bind-identifier",
      "workflowName": "Bind New Identifier"
    },
    {
      "usageType": "MfaVerification",
      "workflowId": "mfa-verification",
      "workflowName": "MFA Verification"
    },
    {
      "usageType": "BindMfa",
      "workflowId": "bind-mfa",
      "workflowName": "Bind MFA"
    }
  ],
  "fromEmail": "[email protected]",
  "fromName": "Your App Name"
}

Configuration Fields

| Field | Type | Required | Description | |-------|------|----------|-------------| | secretKey | string | Yes | Your Novu API secret key | | serverUrl | string | No | Novu server URL (default: https://eu.api.novu.co) | | templates | array | Yes | Array of template configurations (at least one required) | | fromEmail | string | No | Override the default from email address | | fromName | string | No | Override the default from name |

Server URL Options

| Region | URL | |--------|-----| | EU (default) | https://eu.api.novu.co | | US | https://api.novu.co | | Self-hosted | https://novu.your-domain.com |

Template Configuration

Each template in the templates array must include:

| Field | Type | Required | Description | |-------|------|----------|-------------| | usageType | enum | Yes | See "Usage Type Guide" below | | workflowId | string | Yes | The Novu workflow identifier to trigger | | workflowName | string | No | Human-readable name for documentation |

Usage Type Guide

  • Register: Sent when a new user signs up
  • SignIn: Sent when an existing user signs in with passwordless authentication
  • ForgotPassword: Sent when a user requests a password reset
  • Generic: Sent for generic verification purposes
  • OrganizationInvitation: Sent when inviting users to an organization
  • UserPermissionValidation: Sent to verify identity for sensitive operations
  • BindNewIdentifier: Sent when binding a new email to an account
  • MfaVerification: Sent for MFA challenges during login
  • BindMfa: Sent when setting up email-based MFA

How It Works

  1. When a user triggers an authentication flow in Logto that requires email verification
  2. Logto calls this connector's sendMessage method
  3. The connector finds the appropriate Novu workflow based on the usage type
  4. A Novu workflow is triggered with the verification code
  5. Novu delivers the email to the user
  6. The user enters the code to complete authentication

Novu Workflow Payload

When the connector triggers a Novu workflow, it sends the following payload:

{
  to: {
    subscriberId: "[email protected]",
    email: "[email protected]"
  },
  payload: {
    code: "123456",
    email: "[email protected]",
    type?: "Register" | "SignIn" | "ForgotPassword" | "Continue" | "Generic"
  },
  overrides?: {
    email: {
      from?: "[email protected]",
      senderName?: "Your App Name"
    }
  }
}

In your Novu email templates, you can access:

  • {{code}} - The verification code
  • {{email}} - The recipient's email address
  • {{type}} - The authentication flow type

Troubleshooting

"Cannot find Novu workflow template for usage type"

Cause: The configuration doesn't include a template for the requested usage type.

Solution: Add a template configuration for the missing usage type in your connector configuration.

"Failed to send email via Novu"

Cause: Novu API request failed.

Possible solutions:

  • Verify your Novu secret key is correct
  • Check that the workflow IDs exist and are published in Novu
  • Ensure your Novu account is active and not rate-limited
  • Check Novu's dashboard for error logs

"Verification code is required in payload"

Cause: Logto didn't provide a verification code in the request.

Solution: This is usually a Logto configuration issue. Ensure your authentication flow is properly configured.

Development

Building

npm run build

Development Mode

npm run dev

Clean Build Artifacts

npm run clean

Related Links

License

MIT © QuickGuide Health

Support

For issues and questions:

  • GitHub Issues: https://github.com/QuickGuideHealth/quickguide-packages/issues
  • Logto Discord: https://discord.gg/logto
  • Novu Discord: https://discord.gg/novu

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.