[codex] Persist OAuth state and improve network setup#27
Draft
Lihatoo wants to merge 5 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
devspace init/mcpURL requirements andinvalid_clientrecoveryWhy
ChatGPT reuses the
client_idreturned by dynamic client registration. DevSpace previously stored registered clients and tokens only in memory, so any server restart caused the reused client ID to fail withinvalid_client. Users then had to delete and recreate the ChatGPT app.The network setup also required manual workarounds when binding outside
127.0.0.1, and setup always required a custom public URL.Impact
After one final app reconnection when upgrading from the old in-memory implementation, OAuth client IDs and refresh state survive DevSpace restarts. Operators can bind directly to a selected interface and choose localhost during setup when no public URL is needed.
Only token hashes are stored in SQLite; raw access and refresh tokens are not persisted.
Validation
npm run typechecknpm testnpm run buildclient_idstill opened/authorizewith HTTP 200/healthzendpoints return HTTP 200