Implementing Passwordless Login/Signup in Discourse with Auth0 via APIs

Hi,

I’m building an app that uses Auth0 for user login/signup through passwordless magic links, and all interactions are handled via APIs. I want users to automatically log in to our Discourse community if they are already registered. If they are not registered, I want them to be automatically signed up and logged in via the magic link.

Additionally, if a user logs in via Auth0 on Shopify, can this be extended to automatically log them into Discourse as well?

Can this be achieved using Auth0 with Discourse through APIs, and how should I implement it?

Thanks!