0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【備忘録】「Codex に対してデバイスコード認証を有効にする」を無効にしてVSCode拡張機能のCodexが使えなくなった時の回復方法

0
Posted at

概要

タイトル通り、「Codex に対してデバイスコード認証を有効にする」を誤って無効化(切断)してしまい、VSCode拡張機能のCodex (CLIではない)が使えなくなったときの回復方法です。

環境

  • Windows(WSL2)
  • VSCode(拡張機能)

※まぁ、そんなに環境は関係なかろうw

状況(やっちまったこと)

  1. ChatGPTの [設定] > [セキュリティとログイン] > [ChatGPT を使用した安全なサインイン] > [Codex CLI] で [切断] を選択(これがすべての始まり)
    image.png
  2. (不安になったので)VSCode拡張機能のCodexさんに「使えますか?」的なプロンプトを投下
  3. 「Your access token could not be refreshed because your refresh token was revoked. Please log out and sign in again.」と怒られて接続できなくなった(ですよねー)

回復方法

  1. VSCode拡張機能の歯車マークの設定から [ログアウト]
    image.png
  2. VSCode拡張機能の歯車マークの設定から [ログイン] (ログイン方法は、各自いつもログインしている方法で。場所は [ログアウト] 後に、 [ログアウト] と同じ場所に [ログイン] が出てくる)

※ 要は再ログインすればよい!!

やっても意味がなかったこと

  • 拡張機能の再インストール(ですよねー)
  • PC再起動(ですよねー)

その他

  • 「ダメだろうな~」と思いつつも、ChatGPTやらの設定を見直していて試しにやったららやかしましたw(だって、VSCode拡張だからCLIじゃないかもと思うやん
  • 同じことになる人も居そうだし、また同じことをやらかしそうなのでメモ
  • こちらのブログを参考にさせていただいて助かりました!ただCLIじゃなくてVSCode拡張なのでそのままは使えなかった:Codex CLIで「Your access token could not be refreshed because your refresh token was already used. Please log out and sign in again.」が出た時の対処法
  • auth.json とかは特に触る必要なかった(たぶん触らない方がよかろうw)
  • いいですか、VSCode拡張機能で再ログイン すればよいのです(大事なことだから再度言っておきます)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?