Logging in without a password: setting up magic links in Maho
Since 26.1 a customer can sign in with a one time link sent by email: two modes, a fallback password for whoever wants one, and limits that keep abuse out.
A password field is a funnel on any store: someone forgets it, someone reuses the one from another site, someone walks away from the cart because they cannot recall it. A magic link removes the field. The customer types an email, Maho sends a link, they press it and they are in. Since 26.1 the feature ships in the core, so no external module is needed to have it.
This guide covers the configuration and the behaviour the customer sees. Whoever wants the token detail will find the references at the end.
Where it lives
System > Configuration > Customers > Customer Configuration > Magic Link (Passwordless Login) Options. The settings:
| Setting | What it does | Default |
|---|---|---|
| Enable Magic Link | turns the feature on per website | off |
| Token Expiration | minutes the link stays valid | 10 |
| Rate Limit (Email) | requests per hour on the same address | 3 |
| Rate Limit (IP) | requests per hour from the same IP address | 10 |
| Email Template | the template carrying the link | customer_magic_link_email_template |
| Email Identity | sender of the email | General Contact |
| Registration Password Requirement | authentication mode | No Password |
That last row decides everything else.
The two modes
No Password is the default once you enable the feature. The login form shows the email only, the registration form hides the password fields, and the account edit page drops password management. New accounts are created with a generated password that nobody knows, so the link is the only way in.
Require Password, also called hybrid, keeps the password and adds a “Login with Magic Link” button. A customer who already has an account signs in as before, and whoever prefers the link takes that road. It is the mode to pick when you have a customer base used to passwords and you do not want to explain a change to all of them on the same day.
⏳ Note on the ticking minute: ten minutes is a lot for somebody waiting at a computer and very little for somebody who opens the email on a phone after dinner. Pick the value your customers actually use, and do raise it.
The journey of a sign in
In passwordless mode the customer types the email, presses Login, opens the email and lands inside. The token is single use: it is cleared as soon as it is used, so a second click on the same link does nothing.
In hybrid mode both routes sit on the same screen: the password field with its button and the magic link button. A customer who mistypes the password is not forced to reset it, they can simply take the other road.
Registration changes too. In passwordless mode the form asks for the details, creates the account and immediately sends the link for the first sign in. In hybrid the form asks for a password and the link stays an option.
⏳ Note on the ticking minute: passwordless registration only works if the server sends email. Before switching it on, place a test order and check that the email really arrives, not just that the form says “sent”.
What does not change for the customer
Addresses, orders, address book, downloads: everything stays where it was. Passwordless mode does not touch account data, it only changes how someone proves they own the account.
The limits that protect the store
Two separate caps, because abuse comes in two shapes.
- Per email, three requests an hour: it stops the link being used to flood somebody’s inbox.
- Per IP address, ten requests an hour: it stops an automated attempt from a single source while leaving room for several people sharing a network, such as an office or a school.
Past the limit the customer sees a clear message and has to wait. If a customer complains the link never arrives, read these counters first: often they pressed five times in two minutes.
One detail worth knowing: when the email matches no account, Maho does not say so. It answers as if the link had been sent. That is deliberate, since a different message would turn the form into a tool for discovering which addresses are registered.
The email is the login
The template is edited in System > Transactional Emails, looking for
customer_magic_link_email_template. It is worth customising: it is the first thing a new customer
reads from the store, and a bare link inside a generic template makes the email look like a phishing
attempt.
⏳ Note on the ticking minute: a link that arrives twenty minutes late helps nobody. If the email queue is slow, the problem is not the magic link, it is the transport.
When it fits and when it does not
It fits a store where most customers buy from a phone: fewer fields, less friction, fewer lost passwords. It fits less when your audience uses a mail client that opens links in a preview, because in that case the token can be spent before the person ever sees it. There, hybrid mode is the reasonable compromise.
Under the hood, in two lines
The module adds no tables: it reuses the reset token columns already on the customer account and a counter table for the limits. The token is 32 hexadecimal characters, the comparison is done in a way that does not leak timing, and a valid sign in requires an active account.
Text prepared with the help of AI and checked against the source before publication. It can still contain mistakes: if you find one, report it.Read the manifesto
Does your store still sell?
Tell us where you are starting from: we reply with a first assessment, no strings attached.
Ask for the store assessment