Thanks for following up!
What I meant there is that you may want to try replacing the loginwithredirect() with you custom logic. In case of the login button click handling, replacing the auth0.loginWithRedirect()
with the logic that simply redirects users to your php app. So clicking the login button on your client app only redirects users to another app (your php app) instead of initiating authentication flow with Auth0.