signin with openai
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- authentication, backend
Research direction
Start by reading OpenAI's SIWC token-sharing documentation and the existing @tanstack/ai-openrouter/pkce implementation. The scope also names the BYOK keyring, the ts-react-chat BYOK key dialog, the BYOK and OpenAI adapter documentation, and unit tests for the helpers. Done means the specified sign-in, callback, token refresh, UI, docs, and tests are covered, while respecting the stated token and Responses API limits.
Written by the indexing model from the issue text.
Description
Add "Sign in with ChatGPT" (SIWC) to BYOK, so a user can use their ChatGPT plan instead of pasting an OpenAI API key.
OpenAI docs: https://developers.openai.com/siwc/token-sharing-open-source
Scope
- New subpath
@tanstack/ai-openai/siwc, modelled on@tanstack/ai-openrouter/pkce.- Start: dynamic client registration (
client_id=dynamic_agent_client,agent_name_hint, persistedext_agent_host_id),state,nonce, PKCE S256, redirecthttp://127.0.0.1:<port>/auth/callback. - Callback: check
state, handleerror, keep the issuedclient_id, exchange the code athttps://auth.openai.com/api/accounts/oauth/token, check thatchatgpt.tokens.use.directwas granted. - Refresh on the client: keep the credential (client id, refresh token, expiry) in the BYOK keyring. A helper refreshes the access token before it expires and writes it into the
openaislot. The relay sees an ordinaryx-byok-openaibearer value.
- Start: dynamic client registration (
- No adapter change. Docs explain the SIWC Responses limits (
store: false,stream: true, notemperature/max_output_tokens/metadata/previous_response_id, no hosted tools). ts-react-chat: "Continue with ChatGPT" button in the BYOK key dialog.- Docs: BYOK page and OpenAI adapter page. Unit tests for the helpers.
Constraints
- OpenAI allows this only for open-source and locally hosted apps. Hosted apps need OpenAI's interest form.
- The redirect must be
127.0.0.1(notlocalhost) with the path/auth/callback. - Access tokens last 1 hour. Refresh tokens last 30 days and rotate on every refresh.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 340
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 169
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TanStack/ai
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
withPersistence re-appends stored tool results on an interrupt resume (snapshot ids never match stored id-less tool messages)Possibly taken @tombeckenham claimed this today. Openwaiting-on: maintainer
TanStack/ai#1580 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
update elevenlabsPossibly taken @tombeckenham claimed this 2 days ago. Openhas-pr waiting-on: maintainer
Difficulty 4/5 3-5 days Newbie friendliness 25/100
TanStack/ai#1564 · 1 assignee ·
Maintainers usually reply within 1 day
-
onAfterToolCall failure records a second, contradictory result for a successful server toolPossibly taken @AlemTuzlak claimed this 2 days ago. Openhas-pr waiting-on: maintainer
TanStack/ai#1558 · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
callstackincubator/rozenite#518 ·
Maintainers usually reply within 1 day
-
Area/Workflow Priority/Blocker Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
wso2/product-integrator#2622 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area:bash bug has repro platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anthropics/claude-code#98644 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
allure-framework/allure-js#1603 ·
Maintainers usually reply within 1 day