Declare the Location header on OAuth2 redirect responses in the OpenAPI spec
I maintainer di solito rispondono entro 1 giorno
@HarshMN2345 ci sta già lavorando.
Dal 7/10/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
Direzione di ricerca
Inizia in src/Appwrite/SDK/Specification/Format/OpenAPI3.php, in particolare nella gestione delle risposte intorno alle righe 504-512 e 547-552. Traccia come le due operazioni OAuth2 denominate generano le loro risposte 301, poi controlla come vengono gestite le risposte 204, 302 e 308. Fatto significa che entrambe le risposte 301 dichiarano l'intestazione Location specificata senza contenuto, le risposte 204 rimangono invariate e la specifica viene validata come OpenAPI 3.0.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The OpenAPI 3 spec describes the two OAuth2 redirect endpoints as returning an HTML body with no destination. A 301 is a redirect, and the part a client needs is the Location header. This issue covers declaring the redirect properly in the spec, using only standard OpenAPI fields.
Affected operations (the only 3xx operations in the 2.3.x spec):
GET /account/sessions/oauth2/{provider}(createOAuth2Session)GET /account/tokens/oauth2/{provider}(createOAuth2Token)
Current
"responses": {
"301": {
"description": "No content",
"content": {
"text/html": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
Proposed
"responses": {
"301": {
"description": "Redirect to the OAuth2 provider's sign-in page.",
"headers": {
"Location": {
"description": "URL of the OAuth2 provider's authorization page.",
"schema": {
"type": "string",
"format": "uri"
}
}
}
}
}
- Drop
content. The body of a redirect is not part of the API. - Add
headers.Location(OpenAPI 3.0 Response Objectheaders). - Replace the "No content" description with one that says what the response does.
Where
src/Appwrite/SDK/Specification/Format/OpenAPI3.php:
- Lines ~504-512 add the binary
contentbecause the route's content type is HTML. - Lines ~547-552 set the description to "No content" for 204/301/302/308 and drop
contentonly for 204.
For 301, 302 and 308, drop content as for 204, and emit the Location header.
Why
sdk-generator currently has to infer that these methods are browser redirects from the response shape: a 3xx with a non-JSON binary body (Language::getMethodType). Declaring the Location header states it directly, so generators and other OpenAPI tooling can treat these operations as redirects without guessing.
Context: server SDKs currently request these URLs themselves instead of returning them for the browser to open. Since #14012 that breaks server-started OAuth2 sign-in with user_oauth2_state_invalid, because the nonce cookie never reaches the browser. That SDK fix is tracked separately. This issue only covers the spec.
Out of scope
- sdk-generator changes.
getMethodTypemust switch to "3xx with aLocationheader" in the same release as this change, otherwise SDKs stop classifying these methods aswebAuth. x-appwriteextensions, security schemes, and any other spec changes.
Acceptance criteria
- Both operations'
301responses haveheaders.Locationwithtype: string, format: uri, and nocontent. - The description is no longer "No content" for 3xx responses.
- 204 responses are unchanged.
- The spec validates as OpenAPI 3.0.
- Lingua principale
- TypeScript
- Stelle
- 57.9k
- Fork
- 5.8k
- Merge medio
- 16h 1m
- PR unite (30g)
- 768
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di appwrite/appwrite
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
appwrite/appwrite#15707 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Cloud console cannot load details page of function named "Create"Forse di nuovo libera @priyas1672 l’ha presa 7 giorni fa e non c’è nessuna pull request aperta. Apertaproduct / console product / functions
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
appwrite/appwrite#15344 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
/health endpoint documentation missing since v1.9.xForse di nuovo libera @shahinsamiur l’ha presa 20 giorni fa e non c’è nessuna pull request aperta. Apertaproduct / databases
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
appwrite/appwrite#15005 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Locale currencies list offers only withdrawn codes for Belarus, Venezuela and ZambiaForse già presa @MateenAkram1 l’ha presa 29 giorni fa. Apertaproduct / locale
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
appwrite/appwrite#14627 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di appwrite/appwrite
Issue simili
-
agent-ready area: ui-server priority: p3 type: test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
schlessera/brain-kit#4249 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation tool triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
can1357/oh-my-pi#19608 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
dependencies tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bcgov/nr-waste-plus#1549 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
blixvip/solana-tx-parse#18 ·