Magic Link - Plugin
Magic links are one-time links that are sent to users to login to your web app during the authentication process. Once, users signup to your web app, they are sent a link or URL via email to help them login to the web app.
How to install magic link?
The installation and configuration process is very simple. We have covered each and every step below:
# Plugin Installations
Start by installing the required plugins.
1. Install the Login/Signup Plugin
Go to the plugins page and install the login/signup plugin.
2. Go to Magic Link Plugin
Now, go to Magic Link plugin and click the Install button.
3. Configure Plugin Settings
Select Login workflow event to apply magic link functionality on it so that after signing up when users will login, an email with magic link will be sent to them.
4. Install the Plugin
After selecting the workflow event, click the Install Plugin button.
The installed plugin will look like this:
# Edit Event Configuration
As you install the plugin, the magic link event will get added as well.
5. Go to Magic Link Event
As you install the plugins, the whole bundle containing events, pages, default template will get added automatically. So, refresh the page and open the events panel to go to the Magic Link Login Email event.
6. Edit the Event Settings
As we are incorporating magic link in the login workflow, select the Login Page and Login Form in the event settings.
Then, select Username as the email field.
# Edit the UI
Edit the default template if you want and remove extra fields fom the login form.
7. Edit the Template (if you want)
If you want to edit the default magic link email template, go to templates. Open the Magic link Login Template in edit mode and make the changes.
8. Go to Login Page
Open the login page and remove the Password field from the login form as it won't be required now.
9. Bind the Magic Link Event
Open the settings of the login form and bind the Magic Link Login Email event to it.
# Preview or Publish
Save the changes and open the signup page in the preview or publish mode.
10. Signup/Register
Signup or register by adding any email ID in the username and email fields. Add a password and click the signup button.
11. Login
Go to the login page and add the same email ID with which you signed up. As you click the login button, an email will be sent to you.
12. Open the Email
The sent email will contain a magic link or a URL to help you login to the website.
When you will click on the link, you will get logged in and land on the homepage of the web app.