Skip to main content

Overview

The Passwordless API provides endpoints for implementing passwordless authentication using email or phone number. Users can sign in by receiving a one-time code via email or SMS.

Authentication Flow

  1. Create Code: Generate a passwordless login code for a user’s email or phone number
  2. Consume Code: Verify the code and complete authentication
  3. Resend Code: Generate a new code for an existing authentication attempt

Key Concepts

Device ID

A unique identifier for each authentication attempt. Used to track code verification attempts and prevent abuse.

Pre-Auth Session ID

A hashed version of the device ID returned by the API. Used to identify the authentication session.

User Input Code

The short code (typically 6 digits) that users enter to verify their identity. A one-time use code that can be embedded in magic links for one-click authentication.

Endpoints

Create Code

Generate a new passwordless authentication code

Consume Code

Verify a code and complete authentication

Resend Code

Generate a new code for an existing device

Build docs developers (and LLMs) love