For SPA applications, you should use responseType of token id_token
. The code
response type is for regular webapps with a backend to handle the code exchange flow to obtain an id_token. Response Type of token will return the id_token in the hash fragment directly to your application, which should allow your routing to work as expected.
https://auth0.com/docs/libraries/lock/v10/customization#responsetype-string-