@nxgt/janus-hono 0.3.1 → 0.3.2
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/docs/guide/routes.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/package.json +3 -3
package/docs/guide/routes.md
CHANGED
|
@@ -171,7 +171,7 @@ return c.json({
|
|
|
171
171
|
## A second factor
|
|
172
172
|
|
|
173
173
|
With `janus({ secondFactor })`, `signIn` answers either a session or a
|
|
174
|
-
**challenge** — `{ status: 'secondFactor', challenge, expiresAt }` — and
|
|
174
|
+
**challenge** — `{ status: 'secondFactor', challenge, expiresAt, userId }` — and
|
|
175
175
|
`sendSession` only takes the first. **Narrow on `status` before
|
|
176
176
|
`sendSession`**: passing `signIn`'s answer straight in no longer compiles,
|
|
177
177
|
because a challenge has no `token` and no `session`.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -155,7 +155,7 @@ Also: `Type 'SecondFactorRequired' is missing the following properties …: toke
|
|
|
155
155
|
given a `secondFactor`.
|
|
156
156
|
|
|
157
157
|
**Why:** `signIn` then answers a session, or `{ status: 'secondFactor',
|
|
158
|
-
challenge, expiresAt }` for a user whose second factor is active — and a
|
|
158
|
+
challenge, expiresAt, userId }` for a user whose second factor is active — and a
|
|
159
159
|
challenge is no session to send.
|
|
160
160
|
|
|
161
161
|
**Fix:** switch on `status`, and send the session `secondFactor.confirm`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxgt/janus-hono",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Hono middleware for @nxgt/janus: the signed-in user on every request, the session cookie, routes guarded by a permission, and every error as its status",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@nxgt/janus": "^0.
|
|
52
|
+
"@nxgt/janus": "^0.7.0",
|
|
53
53
|
"@types/bun": "^1.4.2",
|
|
54
54
|
"hono": "^4.13.9",
|
|
55
55
|
"zod": "^4.6.5"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@nxgt/janus": "^0.
|
|
58
|
+
"@nxgt/janus": "^0.7.0",
|
|
59
59
|
"hono": "^4.13.4",
|
|
60
60
|
"typescript": "^6.0.3"
|
|
61
61
|
}
|