How to use auth0-spa-js with passwordless connector + magic link email?

Following the Single Page App documentation, I can set up a sample app with Auth0 and I’ve configured the admin settings such that passwordless login is the only option used.

Auth0 sends an email with a code which users then enter into the sample app and they’re logged in.

I’d like to switch to the “magic link” option, so the users get an email, click the link, and are logged in. However, nowhere in the admin UI do I see an option to set send = link (so the default email template renders a link).

Expected result:

There is an option in the Auth0 admin console to set the send parameter (to control whether passwordless connection uses code or email).

The auth0-spa-js can be configured such that Auth0 sets send=link in it’s email template and sends the user logging in a magic link.

Actual result:

Finding no configuration option in either Auth0 Admin console or auth0-spa-js, it seems the passwordless connection via “magic link” is not possible for auth0-spa-js users.

See also

Other info:

  • Which SDK does this apply to? auth0-spa-js
  • Which verison of the SDK you are using? 1.0.2
  • Which version of the platform are you facing this error on? Node 8
  • Please share the code that is causing the error.
    You can use sample apps from the SPA-JS or React docs:
    Auth0 Single Page App SDK
    Auth0 React SDK Quickstarts: Login
  • Can you share a minimum reproducible? See above.

I assume you’re using the Auth0 hosted login page, specifically the Classic Universal Login (beside the auth0-spa-js on the client application side).

See this doc:

In the Auth0 Dashboard > Universal Login Page > "Login" Tab > Customize Login Page, select the Passwordless Template and then add the line to the configuration:

passwordlessMethod: "link",

as shown here:

Try again, and it will use the magic link instead of code.

1 Like

Thanks @mathiasconradt, that worked! :slight_smile:

1 Like

Glad you have it working now @techieshark!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.