3

I am running into a problem with my angular 2 application on using the URL with browser authentication credentials. If I load the URL without the credentials, it works as expected.

But if I trigger the URL in the format:

https://username:password@[REST_OF_URL], the different page sections are not loading withe such errors being thrown in the console:

EXCEPTION: Uncaught (in promise): SecurityError: The operation is insecure.

I am currently checking it in FireFox version 52.

I debugged, and the issue appears to be due to failure in the routing mechanism when authentication credentials are used.

I followed the router event tracking as suggested here:

How to detect a route change in Angular?

The NavigationStart and RoutesRecognized events are triggered as expected with correct resolution of routes. After this, NavigationError is triggered with the error mentioned above:

SecurityError: The operation is insecure.

How shall I address this? Any known issues to address with routing when using authentication credentials?

Ghasem
  • 14,455
  • 21
  • 138
  • 171
Rohit Chahar
  • 128
  • 9

0 Answers0