bug: Registering redirect_uris via the clients UI fails (needed to register OAuth callbacks)

Aperta
#25 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
html, python

Direzione di ricerca

Start with parse_uri_list in apps/admin/init.py (around line 46) and the clients create/edit form handling, then reproduce by submitting a redirect_uris value through the form locally. The exact error message is not attached yet, so ask for it or check server logs first. Done when a redirect URI can be saved through the form and the auth service's GET /authorize accepts it for that client.

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

Descrizione

What should happen

Per #7 / PR #10, the clients UI exposes redirect_uris fields in the create/edit forms, so an admin can register an OAuth callback URI for a client through the web interface.

What happens instead

Reported 2026-10-09: attempting to register a redirect URI through the deployed UI (campus-admin.up.railway.app, development environment) does not succeed. Exact error message to be attached — reporting on behalf of a user who hit it in the browser.

Concrete case that needs it

Client uid-client-cd3ef100-afe (nyxchange-timetable-v2, development env) needs this callback registered:

https://nyxchange-timetable-v2-development.up.railway.app/finalize_login

The auth service's GET /authorize enforces exact-match redirect_uri validation (campus#651), so until it is registered, the app's entire sign-in flow fails with:

400 AUTH_INVALID_REQUEST: redirect_uri 'https://nyxchange-timetable-v2-development.up.railway.app/finalize_login'
is not registered for client 'uid-client-cd3ef100-afe'

What has been verified (so it's not these)

  • The development deployment is current: latest deployment fc91eaa0 (2026-10-08) includes PR #10 (merged 2026-10-01) — the forms are in the deployed code.
  • The edit path's known blocker, campus-api-python#50 (Clients.update() sent PUT against a PATCH-only route → 405 on every client update) was closed 2026-09-30, before the dependency relock in campus-admin PR #21 (2026-10-07).

Worth checking

  • parse_uri_list normalization of the TEXT-column serialization (apps/admin/__init__.py ~46) when the auth API returns redirect_uris as a JSON string rather than a list — could break rendering of the clients page or the edit form's initial values.
  • Server-side logs at the moment the edit form is submitted.

Workaround in the meantime

campus client update --client-id <id> --redirect-uri <uri> [--redirect-uri <existing> ...]

(note: --redirect-uri replaces the full list, so existing URIs must be re-supplied)

Lingua principale
Python
Stelle
0
Fork
0
Merge medio
13m
PR unite (30g)
62

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 nyjc-computing/campus-admin

Tutte le issue di nyjc-computing/campus-admin

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.