@broberg/sso 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,22 @@ does, and the list of what it deliberately cannot do is part of the design.
|
|
|
8
8
|
pnpm add @broberg/sso
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
**Version numbers below say WHICH HALF they apply to, because the two move at
|
|
12
|
+
different speeds.** The core (`createSsoClient`, `signValue`/`verifyValue`) and
|
|
13
|
+
the Hono adapter (`ssoRoutes`) gained the same capability in different releases
|
|
14
|
+
more than once, and a single number per section quietly told adapter users they
|
|
15
|
+
already had something they did not:
|
|
16
|
+
|
|
17
|
+
| | core | Hono adapter |
|
|
18
|
+
|---|---|---|
|
|
19
|
+
| server-enforced cookie age | 0.2.3 | 0.2.3 |
|
|
20
|
+
| two lifetimes, three distinct callback errors | *yours to write* | **0.3.0** |
|
|
21
|
+
|
|
22
|
+
Reported by broberg-id, who found the same contradiction in their own guide:
|
|
23
|
+
a floor of 0.2.3 beside "the adapter gives you this for free". **A floor that is
|
|
24
|
+
too low is not merely out of date — next to a "you get it for free" it becomes
|
|
25
|
+
advice not to check.**
|
|
26
|
+
|
|
11
27
|
## Configure it with environment variables only
|
|
12
28
|
|
|
13
29
|
```bash
|
|
@@ -145,7 +161,7 @@ rather than discovering: **signing out of your app leaves the Broberg ID session
|
|
|
145
161
|
alive**, so signing back in happens without a prompt. That is right for an app
|
|
146
162
|
on a shared product surface and wrong for a kiosk.
|
|
147
163
|
|
|
148
|
-
### 2. The login flow cookie's lifetime (0.2.
|
|
164
|
+
### 2. The login flow cookie's lifetime (core: 0.2.3 · adapter: 0.3.0)
|
|
149
165
|
|
|
150
166
|
`beginLogin()` hands you `state`, `codeVerifier` and `nonce` and then forgets
|
|
151
167
|
them — where they live between the redirect and the callback is yours. Put them
|
|
@@ -187,10 +203,12 @@ cannot be exchanged is not a key. Measured counter-example from helpdesk, who
|
|
|
187
203
|
run 3× in production; this package's own Hono adapter now does the same, after
|
|
188
204
|
answering every failed callback with one message containing the word *"or"*.
|
|
189
205
|
|
|
190
|
-
**Mount the Hono adapter and you get all of this for free** —
|
|
191
|
-
the longer cookie, and three distinct answers
|
|
192
|
-
`no_login_in_progress` · `bad_login_cookie`).
|
|
193
|
-
|
|
206
|
+
**Mount the Hono adapter on 0.3.0 or later and you get all of this for free** —
|
|
207
|
+
the signed window, the longer cookie, and three distinct answers
|
|
208
|
+
(`login_expired` · `no_login_in_progress` · `bad_login_cookie`). **On 0.2.3–0.2.5
|
|
209
|
+
the adapter had the signed window but still used ONE number for both**, so it
|
|
210
|
+
answered every failed callback with a single message containing the word *"or"*.
|
|
211
|
+
Take the core and nothing is passed on your behalf, on any version. Reported by broberg-id, who found their own framework-free
|
|
194
212
|
example promising a lifetime the code did not enforce: the comment said a
|
|
195
213
|
forgotten cookie could not be reused tomorrow, and for anyone holding the value
|
|
196
214
|
itself, it could.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broberg/sso",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "The thin client for Broberg ID \u2014 send a user to central login, verify the ID token against JWKS, keep a local session. Public client + PKCE only: no passwords, no passkeys, no client secret can live in an app.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|