CodexAuthScreen(
self,
)ModalScreen[bool]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.
Compose the modal layout.
Apply ASCII border when needed and kick off the OAuth worker.
Open the authorize URL when the user clicks it.
Render the authorize URL in the modal.
Called on the event loop from the async sign-in worker (the worker is
started with thread=False), so it can mutate widgets directly.
React to worker completion: notify, then dismiss the modal.
Cancel the sign-in flow and dismiss the modal.