Appearance
Request magic link
Use this action to request a passwordless sign‑in link for a user. WeWeb will then generate a one‑time token and a ready‑to‑use URL. The delivery (e.g., sending the email) is handled in the event trigger: On magic link requested →
Configuration
| Display Key | Example Input | Description |
|---|---|---|
| "user@example.com" | The recipient address that will receive the link. This should match the email of the user in the database. | |
| Name Optional | "Jane Doe" | Display name (for messages/logs) |
| Redirect Page Optional | Dashboard page | Page to open if the user is an existing user |
| New User Redirect Page Optional | Onboarding page | Page to open if the user is a new user |
| Error Redirect Page Optional | Error page | Page to open when link redemption fails (such as the token being invalid) |
NEW USER vs EXISTING USER
Whenever the user ulitmately clicks the generated magic link, the Email you pass into the action is what the internal logic uses to decide whether the user is new and is to be directed to the New User Redirect Page, or the user is existing and is to be directed to the Redirect Page.
Thus, it is very important when configuring the action you keep in mind that you are expected to pass in the emails of your existing users
Example URL Generation
Here is an example generated URL from the action:
https://your-domain.com/magic-link?token=eyJhbGciOi...&redirect_url=https://your-app.com/dashboard&error_redirect_url=https://your-app.com/error&new_user_redirect_url=https://your-app.com/onboardingBreakdown:
Base path:
https://your-domain.com/magic-linkThis is simply whatever domain is configured for your project.
token: "EyJhbGciOi...""A one‑time token that is automatically generated. Whenever the user clicks the link, WeWeb will automatically determine who the user is and whethever they are a new or existing user based on this token.
redirect_url:https://your-domain.com/dashboardThe URL to route the user to if they are an existing user.
new_user_redirect_url:https://your-domain.com/onboardingThe URL to route the user to if they are a new user.
error_redirect_url:https://your-domain.com/errorThe URL to route the user to if there was an error (such as and invalid token).
Sending the magic link to the user
For most practical use cases, you will need to send the generated magic link to the user via email, and doing so requires using its related Event Trigger.
Here's what happens when this action runs:
- WeWeb generates a token and builds the magic link URL using your redirect selections
- In the
Data & APItab, the event triggerOn magic link requestedis fired with the data{ email, token, url } - In the trigger, you decide how to deliver the link (e.g., send an email with Resend)
Learn how to use the 'On magic link requested' Event Trigger →
Example flow
1
Collect the user’s email in a form
2
Run
Request magic link with the email3
In the
On magic link requested Event Trigger, send the user the magic link (such as via email with Resend/SendGrid, or SMS with Twilio)4
Show a confirmation page (e.g., “Check your inbox”)
Related Event Triggers
The
Request magic link action will fire these Event TriggersUse this trigger to build and send your passwordless sign‑in email, set the subject/body, and/or logging whenever a user requests a magic link.

