Skip to content

[Windows][Desktop browser] Native HTTP authentication dialog closes immediately #43032

Closed

Description

@tov-vl

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

26.901.41600 (Windows MSIX package 26.901.5280.0)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

When the built-in browser reaches an OIDC identity provider that requests native HTTP authentication, the native Sign in dialog appears with username and password fields but closes approximately 100-150 ms later, before the user can type anything.

The browser then replaces the identity-provider page with its local error page:

This site can't be reached
ERR_INVALID_AUTH_CREDENTIALS

No credentials were entered before the error. The same protected URL and authentication flow work in regular Chrome and Edge on the same Windows computer.

The affected identity-provider hostname, full OIDC URL, state, nonce, and corporate application details are intentionally redacted. The authentication scheme advertised by the server has not been established, so this report does not assume Basic, NTLM, or Negotiate.

What steps can reproduce the bug?

  1. On Codex Desktop for Windows, open the built-in browser.
  2. Navigate to an OIDC-protected web application whose identity provider triggers Chromium's native username/password authentication dialog.
  3. Wait for the redirect to the identity provider.
  4. Observe that the native Sign in dialog appears briefly.
  5. Before either field can be used, the dialog closes and the tab displays ERR_INVALID_AUTH_CREDENTIALS.
  6. Click Reload and observe the same behavior.

The local desktop log recorded three consecutive attempts:

Attempt 1: identity-provider page ready -> local error page after 123 ms
Attempt 2: identity-provider page ready -> local error page after 146 ms
Attempt 3: identity-provider page ready -> local error page after 115 ms

The local error page is a data:text/html navigation generated by Codex Desktop, rather than content returned by the identity provider.

What is the expected behavior?

The native HTTP authentication dialog should remain open until the user submits credentials or explicitly cancels it. A pending authentication challenge should not be replaced by the built-in browser's local error page.

After valid credentials are submitted, the OIDC flow should continue. If credentials are rejected or the dialog is cancelled, the browser may then show an appropriate error or allow another attempt.

Additional information

Local inspection of the packaged desktop application suggests a race between the native authentication prompt and main-frame load-failure handling:

  • the main-frame did-fail-load handler handles ERR_INVALID_AUTH_CREDENTIALS;
  • it calls the browser error-page loader;
  • the loader navigates to a local data: URL with replaceCurrentEntry: true;
  • that navigation destroys the still-pending native authentication dialog.

A possible fix is to defer main-frame error-page navigation while an HTTP authentication challenge is pending, or specifically avoid handling ERR_INVALID_AUTH_CREDENTIALS as final until the authentication callback has completed.

Suggested regression checks:

  1. A native HTTP authentication challenge keeps the dialog open while user input is pending.
  2. Submitting valid credentials continues the original navigation.
  3. Cancelling the dialog follows a defined error path without a race.
  4. Rejected credentials permit the expected retry behavior.

The raw video and full desktop log contain private corporate URLs and transient OIDC parameters, so they should not be attached without redaction. A sanitized screenshot or focused log excerpt can be provided if needed.

Activity

  1. added
    bug
    app
    windows-os
    auth
    on Sep 5, 2026
  2. tov-vl commented on Sep 5, 2026

    @tov-vl
    Author

    I isolated the behavior from OIDC and the corporate identity provider with a minimal local HTTP Basic Auth challenge.

    Minimal server:

    import http from "node:http";
    
    http.createServer((request, response) => {
      if (!request.headers.authorization) {
        response.writeHead(401, {
          "WWW-Authenticate": 'Basic realm="Codex Browser Auth Test"',
          "Content-Type": "text/plain",
          "Cache-Control": "no-store",
        });
        response.end("Authentication required");
        return;
      }
    
      response.writeHead(200, { "Content-Type": "text/plain" });
      response.end("Authentication accepted");
    }).listen(43123, "127.0.0.1");

    Baseline verification:

    • an unauthenticated HTTP client receives 401 Unauthorized with WWW-Authenticate: Basic;
    • the same client receives 200 OK after sending synthetic Basic credentials;
    • the server records only whether the Authorization header is present and never logs its value.

    Two Codex in-app Browser Use navigation attempts, using 127.0.0.1 and localhost, each reached the server and received the Basic challenge. In both cases:

    • the server saw only the initial unauthenticated GET; there was no authenticated retry;
    • Browser Use reported net::ERR_BLOCKED_BY_CLIENT;
    • the newly created tab remained on about:blank.

    This removes OIDC and the corporate identity provider from the reproduction and shows that a plain Basic challenge cannot complete in the Codex in-app browser. Because these two attempts were initiated through Browser Use rather than manual address-bar navigation, I am treating this as supporting evidence rather than claiming it reproduces the exact native-dialog timing by itself.

    I then repeated the test manually against the same endpoint on the same Windows computer, without entering any credentials:

    • Codex in-app browser: the native username/password dialog appeared and immediately closed;
    • Chrome: the native dialog remained open and waited for user input.

    This manual A/B test reproduces the original dialog-lifetime failure with a plain Basic challenge and rules out OIDC and the corporate identity provider as prerequisites.

    I also inspected the packaged app.asar from Codex Desktop 26.901.41600 / MSIX 26.901.5280.0. The bundle contains the browser-sidebar main-frame error-page navigation with replaceCurrentEntry: true, but I found no standard Electron login handler markers (authenticationResponseDetails, firstAuthAttempt, isRequestForNavigation, or authInfo) and no direct login event registration. This static check cannot rule out a native or dynamically registered handler, but it is consistent with the default-cancel path described above.

  3. pke commented on Sep 25, 2026

    @pke

    Additional report on 2026-09-25 with Windows MSIX package OpenAI.Codex 26.917.6896.0, x64 (version read from the installed package, not the About dialog).

    The user observes the same behavior in the desktop app's built-in browser: opening a private HTTPS application triggers the native username/password authentication dialog, but it immediately closes, preventing login. Dialog timing was not measured.

    An independent unauthenticated HTTPS request to the same application verified:

    HTTP 401
    WWW-Authenticate: Basic realm="redacted", charset="UTF-8"

    The realm value above is redacted. The response has no Location header. The application source also confirms this is its ordinary HTTP Basic admin-authentication challenge. No credentials were submitted by the diagnostic check.

    Expected: the dialog remains usable until credentials are submitted or the user explicitly cancels.

    This adds a report on a newer Windows package to the existing dialog-lifetime issue. The exact browser-side cause has not been established, and no browser error code is asserted for this report. Private site addresses, credentials, raw logs and session transcripts are omitted.

  4. flanselle commented on Oct 7, 2026

    @flanselle

    Additional report on 2026-10-07: Windows, installed MSIX package OpenAI.Codex 26.930.4958.0.

    The package version was read from Get-AppxPackage. This is package metadata, not a reading of the About dialog.

    The user reports that, when opening a private HTTPS development application in the built-in browser, the HTTP authentication username/password dialog appears and closes before they have time to enter credentials. The same application is accessible in their regular Chrome session. The user explicitly reconfirmed the disappearing-dialog behavior today. No dialog duration was measured.

    During the earlier failed built-in-browser attempt, the generated error page contained ERR_INVALID_AUTH_CREDENTIALS. Browser Use then refused to inspect that data: error page because only HTTP/HTTPS protocols were permitted. We have not established whether this subsequent tool refusal is related to the original dialog failure; these are recorded as separate observations.

    This blocks authenticated review of a development application. Repeating the credential-entry request has not provided a usable sign-in flow. We are not claiming a new synthetic reproduction, a verified internal cause, or that restarting the app resolves it.

    Could the maintainers confirm a supported way to complete HTTP Basic authentication in the Windows built-in browser, or a fixed build? Expected behavior: keep the authentication dialog available until the user submits credentials or explicitly cancels.

    No private hostname, credentials, tokens, application records, screenshots, raw logs, or session transcripts are included in this comment. No authentication protection has been disabled.

  5. tov-vl commented on Oct 29, 2026

    @tov-vl
    Author

    Retested on Windows with app version 26.1023.51421 (MSIX 26.1023.6621.0). The immediate dialog dismissal no longer reproduces with the local HTTP Basic Auth test described above.

    The native dialog remains open for input, and submitting valid synthetic credentials succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appauthbrowserbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions