Intelligence Center

Magic link Authentication

In this lesson, you're going to learn how to authenticate users through their email. This method is also known as magic link or passwordless authentication.
Here is a step-by-step article on setting up passwordless sign-in with Airtable and Wized:

Step 1: Add Airtable to My Apps

The first step is to add Airtable to your apps.
To get your API key, go to Airtable, click on the profile Icon, and click on settings. There, you can generate a new API token.
Once this is done, you can proceed to set up your authentication layer. If you prefer to use Firebase or Supabase, you can apply the same learnings there.

Step 2: Configure Your Set-Up

Once your Airtable is set up, expand the dropdown in the Auth panel and choose Airtable as the authentication provider.
Specify your user location by selecting the base and the table with the email and password fields that you created in Airtable.

Step 3: Build Your Signup Request

Now that your setup is configured, you can start building your first requests. The first request you will add is a "Create User" request that will be applied to the sign-up page.
Click on the plus sign to create a new request. Then, and bind the email input to the request.
Then go to the After request action section, and add the page where you want to redirect the user once they click on the email link. In this case, the dashboard.

Step 4: Add Login User Request

Add a new request for the login user request. Add the email input under General and apply the same attribute to the input that you have on the sign-up form.

Step 5: Add an Action

Now you need to add an action to trigger the login, and sign-up requests.
Create a new action that triggers the sign-up request, then do the same for the login request.
Specify the configuration for each action and make sure to name the actions so you can keep track of them. Apply them to the corresponding buttons.

Step 6: Create a new query parameter

Go to the Page Data panel, expand the General accordion, and add a new Navigation parameter. Give the parameter a name of token.

Step 7: Create your Load User request

Go to the Auth panel, and click on Load User. This will preconfigure a new Data In request for you.
Under Trigger, choose On page load, and run this request on every page where the user should be loaded.
Make sure that this request runs also on the page to which your user is redirected after they click on the login link in their email.
And that's it! You now have passwordless sign-in set up with Airtable and Wized.