Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Magic Login Link

38 sites Security covered Drupal 11 · not 10
View on drupal.org

This module enables passwordless login for Drupal sites by sending users a one-time link via email. Users can request a magic link from the login page, and clicking the link authenticates them without a password. It offers configurable expiry times, customizable email templates, and maintains Drupal's security standards.

Adds HTMX-powered passwordless authentication to Drupals core login form. Users can request a one-time login link via email. Suitable for sites that want frictionless sign-in without passwords while preserving Drupal security practices.

Requirements

  • Drupal 11.2 (or later)
  • HTMX module (drupal/htmx ^1.5)

Features

  • HTMX-powered passwordless authentication
  • Configurable magic link expiry times
  • Customizable email templates with token support
  • CSRF protection and security features

Configuration

  • Go to Configuration > People > Magic Link (/admin/config/people/magic-link).
  • Set link expiry (e.g., 15m, 1h, 24h).
  • Customize email templates and token settings.
  • Optionally set a default destination after login.

Email templates support tokens; ensure outbound email is configured.

Usage

On the core login page, users click "Send me a magic link", enter their email, and receive a one-time login URL.

The module validates the token, logs the user in, and redirects to the configured destination.

Drush Command

Generate persistent magic links for development:

# Generate link for user 1 (1 hour expiry)
drush mli

# Generate link for user 123 (24 hour expiry)
drush mli --expire=24h --uid=123

# Generate link with custom destination
drush mli --expire=3d --destination=/admin 

Permissions

  • Ensure the "Request magic link" route is accessible to anonymous users (default).
  • Normal Drupal mail permissions/rate-limits apply if customized at site level.

Security considerations

  • Links are single-use and time-limited.
  • CSRF protections are in place around the request lifecycle.
  • Treat magic links like passwords: do not share or log them in plaintext.

Depends on

Dependencies of the latest stable release

  • htmx Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
8
Tracked since
Oct 2025
Latest release
10 months ago
Releases (12 mo)
8 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
1.0.6 Stable 11 Oct 16, 2025
1.0.0 Stable 11 Oct 16, 2025
1.0.5 Stable 11 Oct 11, 2025
1.0.4 Stable 11 Oct 8, 2025
1.0.3 Stable 11 Oct 8, 2025
1.0.2 Stable 11 Oct 8, 2025
1.0.1 Stable 11 Oct 6, 2025
1.x-dev Dev 11 Oct 6, 2025