Mongoose Networking basic auth

I’m using Mongoose Networking library.

I want to request the browser to pop up basic http auth, and then send 401 or continue depending on the basic auth.

I do not want to use the digest auth (I need to check it to a db, and yes, I’ll hash it myself).

What do I need to make the mongoose networking library to popup the basic auth?
(I did it already on the past, but now I don’t know how).
I have code to receive the auth when it is present on headers, but I can’t trigger the browser popup.

Send a response like this:

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Basic realm=YOUR_DOMAIN
1 Like

The www-authenticate worked!