I’ve been going round in circles with this. I have a need to have the user login form on the main site, so avoiding directing the user off-site to auth0.
I begain with Lock.js but that loads the Auth0 form as an overlay, so that’s not meeting the requirement.
I then tried posting my own form to a PHP method. I couldn’t see a method in the PHP SDK that lets me pass credentials to auth0, instead you call login() and that redirects you off-site. So a non-starter there too.
I moved onto Auth0.js and successfully submitted my on-site form and returned to a URL on my site where I was hoping to use the PHP SDK to get the user details so I can create a user in my application, and log them in. However the state fails to verify presumably because the process was instigated with Auth0.js rather than with the PHP SDK.
Sticking with Auth0.js I can’t see an exchange method that’s equivalent to the PHP SDK, and when I change the responseType to token, I can’t see how to get the user’s profile from the token. The docs mention a getUser method but that doesn’t exist on Auth0.js.
So how can I achieve this seemingly simple task - to use my own form, on my own site?