Auth0 Home Blog Docs

parseHash doesn't seem to work with non-empty hash prefixes



If I set up an angular app not in HTML mode…

$locationProvider.html5Mode(false); // or let this happen by default

…and I use anything other than an empty string for the hash prefix…

$locationProvider.hashPrefix('#'); // or let this happen by default

Then parseHash seems to fail to extract the accessToken.

I know I can work around this problem by using $locationProvider.hashPrefix(''); - then parseHash works fine for me. But I’m updating an existing app to use the new Auth0 APIs, and I’d really rather not change the URLs for every page in my site.

Is there any way to get parseHash to work if you’re using the default #! URLs?


I happen to be in a similar scenario. @dale.lane Did you find a solution to that?