openai / openai/codex

YubiKey / hardware security key login loop in Codex Desktop for Windows

Open
#40,888 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug session windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.820.60940

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

After enabling Advanced Account Security, I can successfully authenticate with my YubiKey when Codex starts. But as soon as I open a project or chat, Codex asks me to authenticate again. After successful YubiKey login it returns to the project, and opening the chat immediately triggers the login flow again - endless loop.

The hardware-key authentication itself succeeds; the Windows Codex Desktop session just doesn’t stay authenticated.

This currently makes Codex Desktop practically unusable for users who are required to use physical security keys.

What steps can reproduce the bug?
  1. Use Codex Desktop on Windows with an OpenAI account that has Advanced Account Security enabled and requires authentication with a physical FIDO2 hardware security key (YubiKey).

  2. Launch Codex Desktop.

  3. Complete the login flow using the YubiKey. Authentication succeeds and Codex opens normally.

  4. Select an existing project.

  5. Open any existing chat/thread inside that project.

  6. Codex immediately starts the login flow again.

  7. Authenticate again successfully with the same YubiKey.

  8. Codex returns to the project view.

  9. Open the chat/thread again.

  10. The login flow starts again.

This repeats indefinitely.

What is the expected behavior?

Expected behavior:
After successfully authenticating with the YubiKey, Codex Desktop should preserve the authenticated session and allow projects and chats to open normally.

Actual behavior:
YubiKey authentication succeeds, but opening a project/chat causes Codex Desktop to request authentication again, resulting in an endless authentication loop.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the login flow in Codex Desktop on Windows with Advanced Account Security and a YubiKey, then trace what happens when opening an existing project and chat. The work is done when successful hardware-key authentication persists and projects and chats open without restarting the login flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.