Is this accomplished by having a state parameter? I don’t understand the logic. Could you assist us with a short snippet to try with our lock? we need to login and stay on page if successful.
I don’t see why there would be a loop. You should be listening for the lock.on("authenticated",...)
event in your application to handle the response from Auth0 and load your application as required.