# Passwordless with magic link

**URL:** <https://community.auth0.com/t/passwordless-with-magic-link/60762>\
**Category:** Get Help\
**Tags:** lock, login, auth0\
**Created:** [April 8, 2021, 11:02am UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762 "2021-04-08T11:02:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrecasal](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrecasal/32/28659_2.png) [@andrecasal](https://community.auth0.com/u/andrecasal)\
**Post date:** [April 8, 2021, 11:02am UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762/1 "2021-04-08T11:02:44Z")

</div>

Please include the following information in your post:

- **Which SDK this is regarding:** auth0.js
- **SDK Version:** 9.15.0
- **Platform Version:** Node 15.12.0

I have an SPA built in Gatsby with classic universal login (classic, because passwordless is not yet supported in the new universal login) and it seems that by default the passwordless login uses the code method. I’d like to change this to the magic-link method, but I can’t seem to find the right information about this.

I was going over the options object for the `new auth0.WebAuth(options)` but I can’t seem to find any options to change the passwordless method from code to magic-link.

In the [auth0.js documentation](https://auth0.com/docs/libraries/auth0js#passwordless-login), it says to set:  
webAuth.passwordlessStart({  
connection: ‘email’,  
send: ‘code’,  
email: ‘foo@bar.com’  
}, function (err,res) {  
// handle errors or continue  
}  
);

…but, if I understand correctly, this implies an embedded login form instead of using the auth0 hosted login.

So I’m confused: is it the case that auth0-hosted login doesn’t support magic-links and I should implement an embedded login or it does support magic-links and I’m missing some information on how to tell auth0 to use magic-links instead of codes?

Cheers!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 8, 2021, 7:42pm UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762/3 "2021-04-08T19:42:59Z")

</div>

Hi @andrecasal,

You won’t need to set up an embedded login. You can continue to use the hosted Universal Login by updating the lock passwordless options to use `passwordlessMethod: 'link'` in the template:

```auto
    var lock = new Auth0LockPasswordless(config.clientID, config.auth0Domain, {
      // ...other configs
      passwordlessMethod: 'link',
    });

```

[https://auth0.com/docs/libraries/lock](https://auth0.com/docs/libraries/lock)

---

<div class="post-metadata">

**Author:** ![andrecasal](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andrecasal/32/28659_2.png) [@andrecasal](https://community.auth0.com/u/andrecasal)\
**Post date:** [April 9, 2021, 10:29am UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762/4 "2021-04-09T10:29:36Z")

</div>

Thanks @stephanie.chamblee that did the trick!

I’m having a few other problems I don’t quite understand (the email I’m receiving is not the one configured on my panel, silent authentication is not working with passwordless, etc). Should I post them here or create a new thread?

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 9, 2021, 11:18am UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762/5 "2021-04-09T11:18:49Z")

</div>

Glad that solved your question!

It’d be best to keep the details for each issue in its own topic so that people can easily find discussions if they run into the same thing. I will keep an eye out for your other topics!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 24, 2021, 11:19am UTC](https://community.auth0.com/t/passwordless-with-magic-link/60762/6 "2021-04-24T11:19:41Z")

</div>

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