Skip to main content

Sign In with Magic Link

Nhost allows you to sign in users with a Magic Link, which is a way to sign in users so they don't have to remember a password.

When users sign in using this sign-in method, they'll enter their email address and then receive an email with a (magic) link. When the user clicks on the (magic) link, they get automatically signed in to your app.

The sign-in method is called Magic Link because the user gets "magically" signed in without having to enter a password.

Configuration

Enable the Magic Link sign-in method in the Nhost dashboard under Settings -> Sign-In Methods -> Magic Link.

Sign In

To sign in users with Magic Link is a two-step process:

  1. Send a Magic Link to the user's email address.
  2. The user clicks the Magic Link in their email to sign in.

Use the Nhost JavaScript client to sign in users with Magic Link:

nhost.auth.signIn({
email: 'joe@example.com'
})

There is no sign up method for Magic Link. Users will be automatically created when they sign in for the first time.

Users who have signed up with email and password can also sign in with Magic Link.

Email

It's possible to edit the "signin-passwordless" email template.