# CodexAuthScreen

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen)

Run the ChatGPT OAuth Authorization Code Flow with PKCE inline.

Dismissal value:

- `True`: a token was saved (caller should refresh provider lists /
    retry the operation that needed the credential).
- `False`: the user cancelled, or the flow failed irrecoverably.

The flow lives in a worker so the modal stays responsive to the cancel
keybinding while `_wait_for_oauth_callback` blocks for up to 5 minutes;
pressing Esc sets the worker's `cancel_event`, which frees the loopback
port within one poll interval rather than holding it until the timeout.

## Signature

```python
CodexAuthScreen(
    self,
)
```

## Extends

- `ModalScreen[bool]`

## Constructors

```python
__init__(
    self,
) -> None
```


## Properties

- `BINDINGS`
- `CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_mount)
- [`on_click()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_click)
- [`on_mouse_move()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_mouse_move)
- [`on_leave()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_leave)
- [`on_authorize_url()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_authorize_url)
- [`on_worker_state_changed()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/on_worker_state_changed)
- [`action_cancel()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/codex_auth/CodexAuthScreen/action_cancel)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/e14e0adcbe78565ed3650e7f24b2a775d5437d25/libs/code/deepagents_code/tui/widgets/codex_auth.py#L69)