Is passwordless magic link only intended for client-side interaction?

Hello everybody,

I currently have a React app that uses Auth0’s magic link authentication method using ‘auth0-js’.

Apart from this React app, I also have a server written in Node.js, which as far as I understand is not participating in the login-via-magic-link workflow (it’s just React <-> Auth0 interaction).

What I’m trying to achieve is to generate the magic link from my Node.js server because I want to send a login email upon schedule. I’ve been researching but it seems to me that this magic-link idea is designed to be initiated from client-side.

I’ve tested the auth.requestMagicLink method from the ‘auth’ library to generate such link from my server, but when the user access it and gets to the React app, the state of the magic link does not match with the one stored in the user’s browser (which makes sense).

Could anyone confirm me if my impression around this is true and such scenario is not possible to achieve with Auth0?

Thanks in advance!

3 Likes

Can we get an answer on this? I’ve found the documentation to be a little confusing

This article Embedded Passwordless Login in Regular Web Applications suggests that the backend (aka a “Regular Web App”) is able to send magic links.

The documentation here Authentication API Explorer suggests that “This endpoint is designed to be called from the client-side”

And the documentation here Passwordless Authentication with Magic Links suggests that “the initial request and its response **must take place in the same browser or the transaction will fail”

So can magic links be initiated from the backend, or no?

Would also like an answer to this. It seems you can request a magic link from the server, but Auth0 will send it out via email. What we want is to be able to receive the link server side, then do what we want with the link (e.g., email it ourselves using SendGrid to our customers).

I’d like an answer on this too, the documentation is not clear.

I’d also like an answer on this. I’m having the same issue as @teguayco.gutierrez that the link obtained by the backend (and sent by auth0 to the user’s email) can’t be used in the React app.

I’m having difficulty determining if it’s possible and how to do so.