Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

signin with openai

Aperta
#1,572 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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, persisted ext_agent_host_id), state, nonce, PKCE S256, redirect http://127.0.0.1:<port>/auth/callback.
    • Callback: check state, handle error, keep the issued client_id, exchange the code at https://auth.openai.com/api/accounts/oauth/token, check that chatgpt.tokens.use.direct was 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 openai slot. The relay sees an ordinary x-byok-openai bearer value.
  • No adapter change. Docs explain the SIWC Responses limits (store: false, stream: true, no temperature/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 (not localhost) with the path /auth/callback.
  • Access tokens last 1 hour. Refresh tokens last 30 days and rotate on every refresh.
Lingua principale
TypeScript
Stelle
3.1k
Fork
340
Merge medio
2g 7h
PR unite (30g)
175

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/ai

Tutte le issue di TanStack/ai

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.