redirectUrl not working for SPA

Thanks, that helped, but it didn’t work. I was redirected to http://localhost:8080. What I did was to set the responseType to 'token' and used the state property of auth option to send the desired path and fetched it in the authenticated callback of auth0-lock as (this wasn’t working with responseType = 'code')

lock.on('authenticated', (authResult) => {
    ...
    window.location.href = '/#' + authResult.state
})

And it works. I wonder if state should not be used for this for security reasons.