A sign-in link (also called a magic link) is a one-click way in. The person gives their email, Pawabase sends a link, and clicking it signs them in on your site. There is no password to remember or leak.

In Studio

Users & auth → Sign-in → Sign-in & registration → Ways to sign in → Sign-in link. It is on by default. Make sure your site’s address is on the redirect list, since the link must return somewhere. Change the wording under Email templates → Sign-in link.
createUser decides what happens for an address with no account: create one (the default), or do nothing. Pass false for an app where only existing people may sign in. In either case the call returns without saying whether the address exists.

Finish on the landing page

In a browser, nothing more is needed: the client reads the session from the address when your page loads, stores it, cleans the address and fires SIGNED_IN. When you handle the link yourself (a server, or a mobile deep link), pass the token from the link:

A complete page

Things to know

  • A link works once and expires. If it fails, show “this link has expired” with a button to send a new one.
  • It signs the person in on the device that opens it. Email apps that open links in an internal browser can confuse people; that is when codes are better.
  • Opening the link proves the inbox is theirs, so the address becomes verified.
  • If the account has two-step verification, the link leads to mfa_required like any other first step.

Troubleshooting

Email codes

The no-link alternative.

Redirect URLs

Where links return.