Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

signin with openai

Abierto
#1,572 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
3.1k
Forks
340
Merge medio
2 d 7 h
PR fusionados (30 d)
175

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/ai

Todos los issues de TanStack/ai

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.