I'm working on a site that uses basic authentication. Using Chrome I've logged in using the basic auth. I now want to remove the basic authentication details from the browser and try a different login.
How do you clear the current basic authentication details when using Chrome?
Basic Authentication wasn't designed to manage logging out. You can do it, but not completely automatically. What you have to do is have the user click a logout link, and send a '401 Unauthorized' in response, using the same realm and at the same URL folder level as the normal 401 you send requesting a login.
Chrome stores login credential data-base under C:\Users\<username>\Appdata\Local\Google\Chrome\User Data\Default\Web Data. It also stores several sensitive user data under C:\Users\<username>\Appdata\Local\Google\Chrome\User Data\Default.
Click on 'Security tab > Local intranet' then the 'Custom level...' button. Scroll to the bottom and select the 'Automatic logon with current user name and password' option. It's under the 'Authentication > Logon' section. Click OK to save the changes.
The basic authentication process for both Chrome and Firefox browsers can be done by appending the username and password in URL of the page.
It seems chrome will always show you the login prompt if you include a username in the url e.g.
http://[email protected]
This is not a real full solution, see Mike's comment below.
You can open an incognito window Ctrl+Shift+n each time you are doing a test. The incognito window will not remember the username and password the last time you entered.
To use this trick, make sure to close all incognito windows. All incognito windows share the same cache. In other words, you cannot open multiple independent incognito windows. If you login in one of them and open another one, those two are related and you will see that the new window remembers the authentication information from the first window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With