Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

signin with openai

Open
#1,572 0 comments 0 reactions 1 assignee View on GitHub

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

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

has-pr waiting-on: maintainer

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.
Dominant language
TypeScript
Stars
3.1k
Forks
340
Avg merge
2d 10h
Merged PRs (30d)
169

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/ai

All issues in TanStack/ai

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.