How to implement Custom Login with ‘html5mode’ in order to remove hash tag from URLs?

Hey everyone,

I use custom login page instead of the Lock and would like to get rid of the hash sign in app URLs, however when I enable ‘html5mode’ in the UI-Router I cannot login to my app.

Could you please let me know if there is a workaround for such behavior?

Thanks in advance.

You may want to be more specific about technologies and/or SDK’s that you’re using. It seems this is related to Angular, but if you leave people to try to guess the replies you get might not match your expectations. In general, a OAuth2/OIDC authentication process for a SPA application will mean that the authentication response is returned as part of the fragment component (#...) of an HTTP redirect response.

After you process that response you’re free to clear the fragment component.

You may want to be more specific about technologies and/or SDK’s that you’re using. It seems this is related to Angular, but if you leave people to try to guess the replies you get might not match your expectations. In general, a OAuth2/OIDC authentication process for a SPA application will mean that the authentication response is returned as part of the fragment component (#...) of an HTTP redirect response.

After you process that response you’re free to clear the fragment component.