Maqetin sends the link that signs someone in.
Sign-in with no password: one button, an expiry and the device that asked. Your server sends it through the send API.
The email.
A sample to adapt: change the names, the product and the button to yours.
Press the button to sign in. It works once and expires in 15 minutes.
Requested from Chrome on macOS.
Sign inSample workspace: Shelfwise, stock and invoicing software for independent shops, based in Austin.
How it is sent.
Your server sends it with one call to the send API, when someone enters their email address on the sign-in page. The call names the template, the person and the data the email prints.
await mq.messages.send({
channel: 'email',
templateId: 'tpl_magic_link',
to: { userId: 'usr_2201' },
from: 'Shelfwise <hello@mail.shelfwise.app>',
data: { sign_in_url: 'https://app.shelfwise.app/auth?token=...', device: 'Chrome on macOS' },
idempotencyKey: 'magic-usr_2201-1405',
})Events to send.
No event starts this email. Your server makes the call when someone asks to sign in.
Check before you send.
- Make the link and its expiry in your app. Maqetin sends the link you put in the data of the call. The token and how long it lasts are yours.
- Name the device. Send it in the data of the call, so a person who did not ask can see that the request was not theirs.
- Reuse the Idempotency-Key on a retry. A retry after an error then never sends a second link.