我在一个使用基本身份验证的网站上工作。使用Chrome我已经登录使用基本的认证。现在我想从浏览器中删除基本的身份验证细节,并尝试不同的登录。

使用Chrome浏览器时,如何清除当前的基本身份验证细节?


当前回答

如果你在url中包含用户名,chrome似乎总是会显示登录提示。

http://me@example.com

这不是一个真正的完整的解决方案,请看下面Mike的评论。

其他回答

你所需要做的就是在地址栏中输入chrome://restart, chrome和所有在后台运行的应用程序将重新启动,Auth密码缓存将被清理。

你应该能够清除您的凭据从您的浏览器通过“清除浏览数据…”在chrome://设置/高级

正如@SalCelli提到的,chrome://restart工作。但是,这会重新启动所有的选项卡。

另一种方法是采用CEGRD建议的隐身模式

但是,如果你不喜欢在Chrome 86 (Mac)上重新启动和隐身使用,我发现@opsb和Mike提供的答案只适用于以下额外步骤。

Enter the wrong username in the url without the resources eg: if the url is http://mywebsite.com/resources/, it will not work if I enter http://wrong@mywebsite.com/resources/, but will work if I enter only http://wrong@mywebsite.com/ it clears the Basic Auth credentials prompt for the credentials again However, entering the valid credentials will not work, as in the background, chrome still send the wrong user as part of the url, even though the url appears right in the address bar When prompted for credentials you would need to Cancel, and click the address bar and reload the page from pressing enter. Now enter the correct password

在我的情况下(Win Chrome v100),它在使用https://@domain.com删除凭据时起作用。在开发工具中验证并查询document.URL。

我用的是Chrome 75。我发现重新启动Chrome不起作用。但是重新启动Chrome浏览器并打开开发者工具就可以了。我不知道为什么会这样。