Repository navigation
Commit 6ff4be0
Show the Orbit sign-in control in the header
The routes landed in cef6b8e with nothing to reach them from. The header
now carries either the reader's name with a logout button, or an "Orbit
ile giriş" button, and both are forms rather than links because both
POST -- a link would let an image tag start or end a session.
The button only appears when ORBIT_ISSUER, ORBIT_CLIENT_ID and
ORBIT_CLIENT_SECRET are all set. A half-configured door offering a button
that answers 503 is worse than no button.
Session lookup goes cheapest-first: no database means the static build,
which has no sessions; no cookie means no D1 read at all. Visitors who
are not signed in -- nearly all of them -- cost nothing extra. Signed-in
requests already bypass the edge cache from cef6b8e, which is what keeps
one reader's name off another reader's screen.
Verified live before writing this: POST /giris/orbit now answers 303 to
Orbit's authorize endpoint carrying client_id=orbit-haber, the registered
redirect_uri, scope=openid profile, state, nonce and an S256 challenge,
and Orbit accepts it -- an unauthenticated visitor gets sent to sign in
rather than an error, which is what recognizing the client looks like.
212 newsroom tests, 22 + 21 Orbit cases, 0 type errors, both builds.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 738df75 commit 6ff4be0
2 files changed
Lines changed: 75 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
18 | 49 | | |
19 | 50 | | |
20 | 51 | | |
| |||
178 | 209 | | |
179 | 210 | | |
180 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
181 | 226 | | |
182 | 227 | | |
183 | 228 | | |
| |||
499 | 544 | | |
500 | 545 | | |
501 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
502 | 551 | | |
503 | 552 | | |
504 | 553 | | |
| |||
0 commit comments