How to maintain the user authenticated in a SPA with custom login?

The alternative mentioned is the cross-origin authentication (https://auth0.com/docs/cross-origin-authentication) possibility which is available in latest versions of Auth0.js and Lock.