Login
Free Sign Up
Docs
/

Auth - Magic Link Generate

Type identifier: auth:magic-link:generate Category: Auth Operations

Description

The Auth - Magic Link Generate node creates a secure, single-use authentication link that users can click to log in without a password. The link is typically sent via email and expires after a configurable period.

Input Handles

Handle

Type

Description

trigger

control

Triggers link generation.

spaceIdentityId

string

The ID of the Space Identity that will log in with this link.

timeoutMinutes

number

(Dynamic) Timeout in minutes. Appears only when Timeout is set to dynamic.

Output Handles

Handle

Type

Description

magicLink

string

The generated magic link URL.

success

control

Triggered when link is generated.

error

control

Triggered when generation fails.

Configuration Options

Option

Type

Default

Description

Space Authentication Strategy

string

-

The authentication strategy to use. If not set, a magic link strategy in the Space is used.

Override Success Experience

string

-

Custom Experience to redirect to after login.

Timeout

number

60

Time to live in minutes, configurable as a literal value or dynamic input. Values outside 1 to 2880 minutes cause the node to fail.

Authentication Strategy

Selects which authentication strategy configuration to use:

  • Defines Space Identity cohort to use

Success Experience Override

Optionally redirect users to a specific Experience after successful authentication, overriding the Authentication Strategy's default.

Timeout

Controls how long the generated magic link remains valid.

  • Default: 60 minutes
  • Minimum: 1 minute
  • Maximum: 2880 minutes (48 hours)
  • Whole minutes only
  • Dynamic mode: exposes a top input handle so the Flow can supply the timeout at runtime
  • Invalid values: cause the node to take the error path

Behaviour

  1. Receives trigger and spaceIdentityId
  2. Uses the Timeout value, or the top input when Timeout is dynamic
  3. Creates a magic link URL for the Space Identity that is valid until the timeout expires
  4. Returns the magic link URL on magicLink and triggers success

The node triggers error instead when no magic link strategy is available in the Space, when no verified domain or Space name is available to build the link, when spaceIdentityId is not a valid ID, or when the timeout is invalid.

Link Format

Generated links follow this structure:

https://<domain>/__auth/ml?t=<token>

Token Properties

  • Cryptographically random
  • Single-use (invalidated after use)
  • Time-limited expiration
  • Bound to specific Space Identity

Examples

Basic Magic Link Login

Flow:

  1. Flow - Trigger: User submits email
  2. Auth - Space Identity Create: Create a new Space Identity
  3. Auth - Magic Link Generate: Create link
  4. Integration - SMTP: Send email with link
  5. UX - Message: Confirm email sent

Custom Landing Experience

Configuration:

  • Override Success Experience: dashboardexperienceid

Use case: Direct users to a specific page after authentication.

Registration Flow

Flow:

  1. Collect user registration data
  2. Create a new Space Identity
  3. Auth - Magic Link Generate: Create verification link
  4. Send welcome email with link
  5. User clicks link → verified and logged in

Related pages