Visual Studio 代码 - 身份验证错误

Ern*_*ata 8 visual-studio-code

我正在使用 VSCode,并在启动 VSCode 时出现以下错误:

You have been signed out because reading stored authentication information failed.

我检查了“Microsoft Authentication”输出并看到记录了以下内容:

[Info  - 12:53:11.944] Reading sessions from secret storage...
[Info  - 12:53:12.8] Got 2 stored sessions
[Trace  - 12:53:12.8] Read the following stored session with scopes: email offline_access openid profile
[Info  - 12:53:12.8] Refreshing token for scopes: email offline_access openid profile
[Trace  - 12:53:12.9] Read the following stored session with scopes: email offline_access openid profile
[Info  - 12:53:12.9] Refreshing token for scopes: email offline_access openid profile
[Error  - 12:53:12.381] Refreshing token failed (for scopes: email offline_access openid profile): {"error":"invalid_grant","error_description":"AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password. The grant was issued on '2022-01-18T01:28:57.1010000Z' and the TokensValidFrom date (before which tokens are not valid) for this user is '2022-03-17T00:24:27.0000000Z'.\r\nTrace ID: 61f7c850-e661-4df6-804d-b09ac98a4300\r\nCorrelation ID: 52be35ff-e99b-4b53-9dbb-2dba8582d605\r\nTimestamp: 2022-03-21 12:53:12Z","error_codes":[50173],"timestamp":"2022-03-21 12:53:12Z","trace_id":"61f7c850-e661-4df6-804d-b09ac98a4300","correlation_id":"52be35ff-e99b-4b53-9dbb-2dba8582d605","error_uri":"https://login.microsoftonline.com/error?code=50173"}
[Error  - 12:53:12.382] Error: Refreshing token failed
[Info  - 12:53:12.382] Logging out of session 'f140c6a2-c524-4206-9a98-2b24b0c5a952/3046af31-b03b-4dec-ac69-5e441c677bfa/cdcd3466-2921-45ce-b841-62e6f5e4151a'
[Info  - 12:53:12.382] Session not found 'f140c6a2-c524-4206-9a98-2b24b0c5a952/3046af31-b03b-4dec-ac69-5e441c677bfa/cdcd3466-2921-45ce-b841-62e6f5e4151a'
[Info  - 12:53:12.423] Setting token for scopes: email offline_access openid profile
[Info  - 12:53:12.423] Token refresh success for scopes: email offline_access openid profile
[Info  - 12:53:12.425] Getting sessions for the following scopes: email offline_access openid profile
[Info  - 12:53:12.425] Got 1 sessions for scopes: email offline_access openid profile
[Info  - 12:53:12.425] Token available from cache (for scopes email offline_access openid profile), expires in 3756998 milliseconds
Run Code Online (Sandbox Code Playgroud)

我不记得必须登录任何 Microsoft 环境才能使用 VSCode,并且不知道如何检查或重置密码来解决此问题。

VSCode 版本:

Version: 1.65.2 (user setup)
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T14:33:55.248Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042
Run Code Online (Sandbox Code Playgroud)

Gre*_*gna 12

这个链接对我有帮助。

\n

怎么修:

\n
    \n
  1. 退出 Visual Studio Code 应用程序
  2. \n
  3. 打开:凭据管理器(“开始\xe2\x86\x92设置”\xe2\x86\x92然后搜索“凭据管理器”)
  4. \n
  5. 单击“Windows 凭据”选项卡。
  6. \n
  7. 删除所有以 vscode.vscode、git:、ada 开头的凭据:
  8. \n
  9. 打开 Visual Studio Code 应用程序并再次登录。完毕
  10. \n
\n

在此输入图像描述\n vscode-修复你已被注销-因为...

\n

  • 奇迹般有效!就我而言,这是在更改密码后发生的。 (2认同)