I am currently developing a web-application using Angular2 with TypeScript (if that matters). This application has to communicate with a webserver, which is asking for a digest authentication. Until now i was using the native login prompt of the browsers, which is automatically showing, when the server returns a "401 unauthorized". The browser only asks for authentication once and automatically uses this username and password for future requests. So I don't have to take care about the authentication, the browser does everything for me. Unfortunately now i have to create a custom login screen, as i have to implement some default actions, such as "register" or "reset passwort", which are ususally accessible from that screen. As digest authentication is quite complex and the browser would allready do all the complex things for me I would like to continue using the browsers functionality, but without using it's login prompt. So is it possible to use the browsers authentication functionality? If it is possible, how can I set the username and the password it should use? EDIT: As someone wanted to close this question as "to broad", i'll try to add some more detail. The web-application gets data from a restful webservice. This webservice requires digest authentication and responds with a 401, if you are using a wrong username or password. As mentioned above, the browser automatically shows a login prompt, if he gets a 401 error. If you enter a valid login, the browser caches those values somewhere and automatically sets them for every future request. Now i basicly want to replace the login prompt and programatically set the values the browser should use for the login. I hope this helps to make the question clear. Continue reading...