Is there any way to enter your credentials every time you close and open your browser ? why do i have to enter it only once?
To my knowledge, it is not possible to logout with basicauth. You could however open an incognito window, if you need to login to another account temporarily.
I use a different way of authentication. Perhaps you are interested in it too. It has the possiblity to log-out as well.
Check this out:
this prevent user can entering a url for navigate to another app page?
I have checked the code @Sempah, it works! thank