github / github/copilot-sdk

[Task] Add automatic GitHub App token refresh to the Copilot SDK

Abierto
#2,540 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Java
Estrellas
10.5k
Forks
1.5k
Merge medio
1 d 11 h
PR fusionados (30 d)
127

Descripción

## Outcome

Long-running SDK sessions can refresh GitHub App credentials without restarting the session or forcing repeated OAuth flows.

## Scope

- Add a supported credential-provider mechanism for lazy or proactive refresh
- Support S2S installation token re-minting before or after the one-hour expiry
- Support U2S refresh tokens and discoverable token lifetime policies
- Retry safely when a token expires during a turn
- Replace reliance on the experimental `session.auth.setCredentials` workaround
- Preserve existing static token behavior

## Acceptance criteria

- [ ] A session running longer than one S2S token lifetime continues without manual token injection
- [ ] A request encountering token expiry can obtain a fresh credential and retry without duplicating unsafe work
- [ ] U2S refresh does not force a new interactive OAuth flow on normal expiry
- [ ] Refresh failures surface clearly and never silently fall back to another identity
- [ ] Node, Go, .NET, and Java SDK behavior is consistent or explicitly staged
- [ ] Public SDK documentation includes secure private-key and refresh guidance

## Dependencies

Coordinate runtime credential update behavior with the bundled CLI. The basic `gitHubToken` acceptance fix remains tracked in github/copilot#30423.

## References

- Parent epic https://github.com/github/copilot/issues/30409
- ADR https://github.com/github/copilot/pull/30449
- Existing prior art github/copilot-sdk#1748

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with ADR github/copilot#30449, prior art github/copilot-sdk#1748, and the parent epic github/copilot#30409. Review the SDK credential-provider and session-auth entry points, then coordinate runtime credential updates with the bundled CLI. Done means safe S2S and U2S refresh, expiry retry behavior, preserved static tokens, consistent or staged SDK behavior, and secure public documentation.

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

Evaluación

Stack tecnológico
github, go, java, node.js
Área
api, authentication, backend-api-design, security
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.