Magic Login
Magic Login lets users sign in or register instantly via email using secure single-use magic links or 6-digit passcodes—eliminating passwords and friction for Drupal sites.
Magic Login simplifies authentication by enabling secure, passwordless sign-ins for Drupal. Users enter their email address and immediately receive a single-use login link or a six-digit passcode—allowing them to access their account without ever remembering or managing a password. Designed with zero-friction onboarding in mind, it can automatically create accounts for first-time visitors, making sign-ups completely seamless.
Features
- Passwordless Authentication: Allows users to log in instantly via a secure, time-limited magic link or a six-digit magic passcode sent straight to their inbox.
- Automatic Account Creation: Option to create accounts automatically when a new email address is used, eliminating complex registration forms.
- Granular Role Controls: Built-in safeguards ensure newly registered accounts only receive allowed non-admin roles without risky permissions.
- Flexible Redirects: Configurable landing pages post-login (with an optional custom welcome screen on the first sign-in).
- Developer-Friendly Hooks: Easily customize signup rules, agree-to-terms checkboxes, or country restrictions using
hook_form_magic_login_signup_form_alter().
Post-Installation
- Install and enable the module via Composer or Drush.
- Navigate to Administration → Configuration → People → Magic Login (
/admin/config/people/magic-login). - Set your preferred landing page path, configure link/code expiration timeouts, and specify role assignment rules for self-registered users.
- Customize the email template or hook into an HTML mail system (such as the HTML Mail module) to fit your site's branding.
Additional Requirements
- Drupal Core:
^10.3 || ^11 - System Requirements: A working mail delivery system on your server (such as Symfony Mailer or SMTP) to ensure prompt delivery of magic links.
Recommended modules/libraries
- A useful companion (but independent) module Magic HTML Mail or Symfony Mailer: Enhances the plain-text sign-in emails with custom HTML styling and branding.
Similar projects
While modules like magic_link, magic_login_link, dripyard_simple_login, and passwordless provide link-based authentication, they strictly require an existing user account. Magic Login is specifically built to support both existing user logins and instant single-step account creation for brand-new users.
Supporting this Module
If you find this module helpful in simplifying your site's login flow, consider starring the repository on GitHub or reporting issues to help improve future releases.
Community Documentation
Configuration guide and developer hook examples are maintained in the project repository README.
Depends on
Dependencies of the latest stable release
- user Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Oct 8, 2026 |