How to clear basic authentication details in chrome

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to clear basic authentication details in chrome



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?





Oh, this pisses me of as well. Firefox behaves similarly by the way, and that's crazy.
– shabunc
May 1 '14 at 9:22





@shabunc similarly, but not identical, and yes i agree with you completely!
– Michael
Dec 16 '14 at 16:56





you can implement in with some request param like ?no_auth that server understands and returns 401, so that chrome will forget remembered auth info.
– Ravshan Samandarov
Jan 11 '17 at 13:03





The accepted answer no longer works as of Chrome 65. Use the chrome://restart answer instead.
– Bob
May 23 at 17:46




17 Answers
17



It seems chrome will always show you the login prompt if you include a username in the url e.g.



http://me@example.com



This is not a real full solution, see Mike's comment below.





Doesn't seem to work in Chrome 18
– Daniel Serodio
Apr 25 '12 at 17:16





After I did this in Chrome 21, I found it started always asking for the password, instead of never. Apparently, it will hide the "username@" part in the URL, but still keep it. If you re-enter the URL after doing this (without the @ part), it will stop asking. Just a tip!
– Mike Caron
Sep 1 '12 at 2:48





Does not work in 26.0.1410.65
– Petr Peller
May 2 '13 at 19:04





Doesn't work for me in Chrome 28 on Mac. If I log in with one user then put a different user in the URL, it seems to use the old user and password.
– Jason
Jul 27 '13 at 18:47





This doesn't seem to work on local host (e.g. user@localhost:8000/admin)
– Chris
Feb 27 '15 at 13:12



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.





sweet, thanks, I tried clearing ALL my browser data, closing and reopening chrome, and it still did not ask for auth details. Opening an incognito window worked :)
– targnation
Jun 10 '12 at 19:02





Though it sounds really strange, this trick does not work for me in Chrome 34 on Windows.
– Martijn
May 3 '14 at 17:43





Doesn't work in Chrome 41
– singsuyash
Apr 1 '15 at 11:01






Doesn't work in Chrome 42 too, at least not for localhost
– Dolfa
Jun 2 '15 at 19:54





Chrome remembers basic auth in incognito windows
– Tyguy7
Jul 22 '15 at 1:24



The authentication is cleared when you exit Chrome.



Note however, that by default Chrome is running apps in the background, so it may not really exit even if you close all Chrome windows. You can either change this behavior under advanced setting, or e.g. under Windows, you can completely exit Chrome by using the Chrome icon in the systray. There should be an icon if Chrome is still running, but maybe you'll find it only in the popup with the hidden icons. The context menu of the Chrome icon has an entry to completely exit Chrome, and you can also change the setting for running apps in the background using that menu.


Settings


Show advanced settings...


System


Continue running background apps when Google Chrome is closed





In my case there was no systray icon, but I had an app running that I had forgotten was a Chrome app (Flowdock) & had to exit it as well.
– Peter Rust
Jun 21 '13 at 16:38





Ctrl-Shift-Q will quit all chrome proccess'
– Patrick
May 2 '16 at 3:42





Doesn't work for me and I don't have the option of "Continue running background apps when Google Chrome is closed". (Chrome version 51)
– David
Jun 10 '16 at 15:27






The option still exists in my Chrome version 51 on Windows.
– Cito
Jun 15 '16 at 12:42





It should be the accepted answer! Also you use chrome://restart as sal-celli said.
– Alex78191
May 7 '17 at 10:16



chrome://restart



all you need to do is to type chrome://restart in the address bar and chrome, with all its apps that are running in background, will restart and the Auth password cache will be cleaned.





Didn't work for me (Version 54.0.2840.98 (64-bit) on Mac OS X 10.11) with On Startup: Continue where you left off
– Frans
Nov 30 '16 at 12:52





Working, in (Chromium) incognito mode, as of 62.0.3202.62 (Official Build) (64-bit) on Windows.
– veganaiZe
Oct 20 '17 at 5:28





Does not work for me (63.0.3239.84 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit))
– Jasper de Vries
Dec 14 '17 at 14:05





Doesn't work for me too now: Version 67.0.3396.87 (Official Build) (64-bit) Ubuntu 16.04 (64-bit)
– yetanothercoder
Jul 3 at 13:28





worked for me on 68.0.3440.106 (Official Build) Built on Ubuntu , running on Ubuntu 18.04 (64-bit)
– simon
Aug 31 at 10:56



function logout(url)
var str = url.replace("http://", "http://" + new Date().getTime() + "@");
var xmlhttp;
if (window.XMLHttpRequest) xmlhttp=new XMLHttpRequest();
else xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.onreadystatechange=function()

if (xmlhttp.readyState==4) location.reload();

xmlhttp.open("GET",str,true);
xmlhttp.setRequestHeader("Authorization","Basic YXNkc2E6")
xmlhttp.send();
return false;





Where does the "Basic YXNkc2E6" value come from?
– bigp
Apr 8 '16 at 21:32





Very well. It really works. The YXNkc2E6 is just a hash string for when you do not want to pass the actual username and password. It is not really necessary here
– Georgios Pligoropoulos
May 13 '16 at 9:10





echo YXNkc2E6 | base64 -D => asdsa:
– whitehat101
Nov 15 '16 at 22:09


echo YXNkc2E6 | base64 -D


asdsa:





Why not just "Basic"?
– Alex78191
May 7 '17 at 10:23



"Basic"





Does not work in latest Chrome
– jjxtra
Dec 21 '17 at 1:12



This isn't exactly what the question is asking for but in case you accidentally saved basic auth credentials and want to clear them or update them:



https://support.google.com/accounts/answer/6197437



Steps 1-4 can be quickly navigated with this link: chrome://settings/passwords



This worked in Chrome Version 59.0.3071.115





your link is broken (try it yourself) the chrome link... copy paste worked
– Toskan
Oct 9 '17 at 14:50





He's talking about Basic authentication data, not form passwords.
– Barmar
Aug 20 at 17:22



May be old thread but thought of adding answer to help others.



I had the same issue with Advanced ReST Client App, I'm not able to clear basic authentication from Chrome neither from app. It simply stopped asking for credentials!



However, I managed to make it work by relaunching Chrome using About Google Chrome -> Relaunch.



Once Chrome is relaunched, when I accessed ReST service, it will ask for user name and password using basic authentication popup.



Hope this helps!





I do not see a “Relaunch” button or link on the “About Google Chrome” view. (Mac OS 10.10, Chrome 40)
– MrColes
Feb 2 '15 at 21:12





maybe it shows after an update?
– nafg
Feb 3 '15 at 23:59





yes only works if there's an update
– Nico Westerdale
Jul 28 '15 at 14:34





you can use chrome://restart
– Alex78191
May 7 '17 at 10:20


chrome://restart



There is no way to do this in Chrome as yet (Chrome 58)



I have found the best solution is to open the url in an Incognito window, which will force you to re-enter the basic authentication credentials.



When you want to change the credentials, close the Incognito window and launch another Incognito window.



A lot of great suggestions here, I'll give the one that I found the most efficient:



Just change your password in the site. The old authentication will became outdated and Chrome will request it again.



Since I had a terminal open, I did a simple script to change the password and in two keypresses it were incremented.





I'm testing locally, so simply changing my password worked especially well for me.
– John Henry
Feb 4 at 20:49



Things changed a lot since the answer was posted.
Now you will see a small key symbol on the right hand side of the URL bar.

Click the symbol and it will take you directly to the saved password dialog where you can remove the password.



Successfully tested in Chrome 49





This is completely untrue. Chrome 53
– patricktokeeffe
Nov 11 '16 at 1:41





Tested on two independend computers, chrome 54 now. It is true and works perfectly.
– John
Nov 14 '16 at 15:50






This only works if the url that you are using your password for and the site you eventually land on/auth through are the same. Say i start at a.com get redirected to b.com and end at a.com i may have a username/password entry on a.com but if the data is forwarded to b.com and that is where i die on authentication this method is useless
– Mutmatt
Feb 3 '17 at 14:50


a.com


b.com


a.com


a.com


b.com





FINALLY an answer to this question that works!!!
– DanM
Aug 23 at 14:34



In Chrome, on the right-hand side of the URL bar when you are at a password protected URL, you should see a small key symbol. Click the symbol and it will take you directly to the Password Management area where you can remove the entry. That will ensure you receive future prompts or have an opportunity to enter a new password and save it.



If you do not see the key symbol, that same Password Management area can be accessed by going to Chrome -> Settings -> Passwords and forms -> Manage Passwords. Or more simply, this URL – chrome://settings/passwords.





There is no symbol on the right of the URL on Auth pages. You are talking about "password" pages, not Auth pages. See stackoverflow.com/questions/5957822/…
– Pacerier
Feb 13 '17 at 9:22



Chrome uses the same Internet Options as IE.



Try opening your Internet Options and removing the URL from "Trusted Sites." This should regenerate a 401 call for credentials when you restart the browser and visit the URL again.



You may need to remove it from "Intranet Sites" as well.



Click settings
Search for password
Click Clear browsing data
Uncheck password checkbox(make sure to choose the right option in Obliterate the following items from)



For Chrome 66 I found the relevant option under:



Using a new Incognito window is probably easier, but for those times you forget and want to clear the saved password, this does the trick without having to restart Chrome (which also works)



You will see popup in chrome
enter image description here



Check the below options and click clear data and you are done.



You can also do it via the settings page, chrome://chrome/settings



Then click the link Manage saved passwords.


Manage saved passwords





This works for normal logins and password saving but BASIC authentication details are not saved in these settings.
– Paul Whipp
Apr 23 '13 at 23:57





Paul's right, opsb's answer is the only which worked for me
– Sajjan Sarkar
Nov 11 '14 at 15:57





Maybe in 2012 they didn't show the BASIC authentication details here, but in 2015 they do. This, to me, is the most sensible place to look for these details.
– Sunil D.
Nov 24 '15 at 18:03





Wrong then and wrong now. As of Chrome 53, the 'manage passwords' page does not list cached basic auth credentials.
– patricktokeeffe
Nov 11 '16 at 1:44





Worked for me. Mac OS Sierra 10.12.1, Chrome 55.0.2883.95 (64-bit)
– Vasily802
Dec 21 '16 at 2:41



You should be able to clear your credentials from your browser via "Clear Browsing Data..." in chrome://settings/advanced





Unless I'm mistaken ( I hope so :) ) this doesn't allow you to clear credentials for a single site. You have to clear all of your saved passwords. I want to be able to switch between users on the site that I'm testing so I really need a method that will allow me to clear just one site.
– opsb
Jun 3 '11 at 8:56





This would be great if it actually worked as Chrome suggests it should. :( obsp's answer worked correctly.
– Dr. C. Hilarius
Aug 1 '12 at 0:43






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

React Native Navigation and navigating to another Screen problem