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

@twosense/n8n-nodes-twosense

v0.1.0

Published

n8n community node for Twosense continuous authentication and behavioral biometrics API

Readme

n8n-nodes-twosense

This is an n8n community node that lets you use Twosense events in your n8n workflows.

Twosense provides continuous authentication and behavioral biometrics to secure access to your applications.

n8n is a fair-code licensed workflow automation platform.

Installation Operations Trigger Credentials Compatibility Requirements Usage Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

Operations

The Twosense node provides the following actions:

Get Twosense Events

Fetch Twosense events within a specific time range for batch processing or historical analysis.

  • Requires start time and optional end time parameters
  • Returns all events within the specified period
  • Automatically handles pagination when there are many events

Get Twosense Session Information

Retrieve detailed information about a specific Twosense session by its ID.

  • Requires session ID (UUID format)
  • Returns structured data with found indicator:
    • found: true → Session data (startTime, userId, device, ipAddress)
    • found: false → Reason why session wasn't found
  • No exceptions thrown - use IF node to branch on found field

Get Twosense Trust Score

Get the current Twosense trust score and trust level for a specific user.

  • Requires username in DOMAIN\username format (or UPN if using Entra ID)
  • Returns structured data with found indicator:
    • found: true → Trust score data (trustScore 0-100, trustLevel high/medium/low, timestamp, device)
    • found: false, reason: 'user_not_found' → User doesn't exist in system
    • found: false, reason: 'no_recent_score' → No score within last 60 minutes
  • No exceptions thrown - use IF node to branch on found field

Features:

  • Automatic OAuth2 token management and refresh
  • Pagination support for event operations

Trigger

On New Twosense Event

The Twosense Trigger node polls for new Twosense events and triggers your workflow automatically when new events are detected.

  • Uses n8n's built-in polling mechanism (configure the interval in the trigger settings)
  • Maintains cursor state between runs to only return new events
  • Ideal for monitoring and real-time alerting workflows

Credentials

This node requires Twosense API credentials. You'll need to provide:

  • API Base URL - Your Twosense API endpoint (e.g., https://webapi.twosense.ai)
  • Client ID - Your OAuth2 client ID
  • Client Secret - Your OAuth2 client secret

Contact your Twosense administrator to obtain these credentials.

Requirements

Database Configuration

Important: For reliable state persistence, this node requires n8n to be configured with PostgreSQL as the database backend.

Real-Time Event Monitoring Workflow

  1. Add the On New Twosense Event Trigger node to your workflow
  2. Configure the polling interval in the trigger settings (e.g., every 5 minutes)
  3. Configure your Twosense API credentials
  4. Connect downstream nodes to process the events

Historical Event Analysis Workflow

  1. Add the Get Twosense Events node
  2. Set the Start Time and optional End Time
  3. Connect downstream nodes to analyze the historical data

Trust Score Check Workflow

  1. Add the Get Twosense Trust Score node
  2. Enter the Username (format: DOMAIN\username)
  3. Use an IF node to branch on the found field:
    • found: true → Trust score found (includes trustScore, trustLevel, device, etc.)
    • found: false, reason: 'user_not_found' → User doesn't exist
    • found: false, reason: 'no_recent_score' → No score within 60 minutes

Trust Score Response Examples:

Success (200):

{
  "found": true,
  "username": "DOMAIN\\user",
  "timestamp": "2026-02-03T10:30:00Z",
  "trustScore": 85,
  "trustLevel": "high",
  "device": "LAPTOP-12345"
}

User not found (404):

{
  "found": false,
  "reason": "user_not_found",
  "username": "DOMAIN\\user",
  "statusCode": 404,
  "message": "User not found in Twosense system"
}

No recent score (204):

{
  "found": false,
  "reason": "no_recent_score",
  "username": "DOMAIN\\user",
  "statusCode": 204,
  "message": "No trust score within the last 60 minutes"
}

Session Information Lookup

  1. Add the Get Twosense Session Information node
  2. Enter the Session ID (UUID)
  3. Use an IF node to branch on the found field:
    • found: true → Session found (includes startTime, userId, device, ipAddress)
    • found: false, reason: 'session_not_found' → Session doesn't exist

Session Response Examples:

Success (200):

{
  "found": true,
  "startTime": "2026-02-03T14:15:22Z",
  "userId": "bd5fe96641d7eabd81505f604b870a8895f68166f96c525b21f87ceb49dab522",
  "device": "DESKTOP-12345",
  "ipAddress": "203.0.113.45"
}

Session not found (404):

{
  "found": false,
  "reason": "session_not_found",
  "sessionId": "82299c01-aec1-4b41-015f-a876cb22255d",
  "statusCode": 404
}

Event Data Structure

Events returned from Get Twosense Events and the Twosense Trigger include:

  • uuid - Unique event identifier
  • timestamp - When the event occurred
  • published - When the event was published (used for cursor tracking)
  • username - Associated user
  • device - Device name
  • ipAddress - Client IP address
  • eventType - Type of event (e.g., user.trust_level_change, user.auth)
  • result - Event result
  • reason - Event reason
  • action - Action taken
  • application - Application name

Resources

License

MIT