@alxia/janus 0.4.4 → 0.4.6
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 +1 -1
- package/docs/guide/errors.md +1 -1
- package/docs/troubleshooting.md +8 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -113,7 +113,7 @@ before `createI18n()`, still answers it.
|
|
|
113
113
|
| 400 | `USER_INVALID`, `PASSWORD_TOO_SHORT`, `TOKEN_*`… |
|
|
114
114
|
| 401 | `CREDENTIALS_INVALID`, `CODE_INVALID` |
|
|
115
115
|
| 403 | `USER_INACTIVE`, `STEP_UP_REQUIRED` |
|
|
116
|
-
| 404 | `NOT_FOUND` |
|
|
116
|
+
| 404 | `NOT_FOUND`, `MAGIC_LINK_DISABLED` (`@softistx/janus` 0.56+, `magicLink: { enabled: false }`) |
|
|
117
117
|
| 409 | `LOGIN_TAKEN`, `VERSION_CONFLICT`, `SECOND_FACTOR_*` |
|
|
118
118
|
| 429 | `MAIL_THROTTLED` (`@softistx/janus` 0.18+), with `retryAfter` and `Retry-After` |
|
|
119
119
|
| 500 | `PERMISSION_DEPTH` |
|
package/docs/guide/errors.md
CHANGED
|
@@ -83,7 +83,7 @@ const app = alxia()
|
|
|
83
83
|
| 400 | `USER_INVALID`, `PASSWORD_TOO_SHORT`, `HASH_UNSUPPORTED`, `TOKEN_UNKNOWN`, `TOKEN_SPENT`, `TOKEN_EXPIRED`, `TOKEN_STALE`, `INVALID_CURSOR` |
|
|
84
84
|
| 401 | `CREDENTIALS_INVALID`, `CODE_INVALID` |
|
|
85
85
|
| 403 | `USER_INACTIVE`, `STEP_UP_REQUIRED` |
|
|
86
|
-
| 404 | `NOT_FOUND` |
|
|
86
|
+
| 404 | `NOT_FOUND`, `MAGIC_LINK_DISABLED` (`@softistx/janus` 0.56+, `magicLink: { enabled: false }`) |
|
|
87
87
|
| 409 | `LOGIN_TAKEN`, `VERSION_CONFLICT`, `SECOND_FACTOR_NOT_ENROLLED`, `SECOND_FACTOR_ACTIVE` |
|
|
88
88
|
| 429 | `MAIL_THROTTLED` — too many e-mails asked for one address or user (`@softistx/janus` 0.18 or later) |
|
|
89
89
|
| 500 | `PERMISSION_DEPTH` — a permission check walked past `maxDepth`: not a denial |
|
package/docs/troubleshooting.md
CHANGED
|
@@ -586,6 +586,14 @@ the visitor to use the last e-mail they received or to wait. To tune it, pass
|
|
|
586
586
|
`janus({ mail: { throttle: { attempts, window } } })`, in `@softistx/janus`;
|
|
587
587
|
`mail: { throttle: false }` turns it off. Needs `@softistx/janus` 0.18 or later.
|
|
588
588
|
|
|
589
|
+
### `404 {"code":"MAGIC_LINK_DISABLED"}`
|
|
590
|
+
|
|
591
|
+
**When:** calling `magicLink.request`, `prepare` or `confirm` on an instance built with `janus({ magicLink: { enabled: false } })`.
|
|
592
|
+
|
|
593
|
+
**Why:** `@softistx/janus` 0.56 and later lets an app switch magic-link sign-in off; it then refuses with `MagicLinkDisabledError`, which `janusErrors()` answers 404 with the code alone.
|
|
594
|
+
|
|
595
|
+
**Fix:** hide the magic-link button by reading `auth.magicLink.enabled`, or turn the option back on (it defaults to `true`).
|
|
596
|
+
|
|
589
597
|
## Traps
|
|
590
598
|
|
|
591
599
|
### Signed in, and the next request is anonymous
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alxia/janus",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "Identities and sessions for alxia on @softistx/janus: the user typed in the context, the session cookie kept and renewed, a typed 401",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@alxia/core": "^0.
|
|
45
|
-
"@alxia/i18n": "^0.5.
|
|
46
|
-
"@alxia/language": "^0.3.
|
|
44
|
+
"@alxia/core": "^0.21.1",
|
|
45
|
+
"@alxia/i18n": "^0.5.2",
|
|
46
|
+
"@alxia/language": "^0.3.17",
|
|
47
47
|
"@softistx/i18n": "^3.2.0",
|
|
48
|
-
"@softistx/janus": "^0.
|
|
48
|
+
"@softistx/janus": "^0.56.0",
|
|
49
49
|
"@types/bun": "^1.4.4",
|
|
50
50
|
"zod": "^4.6.5"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@alxia/core": "^0.
|
|
54
|
-
"@softistx/janus": ">=0.38.1 <0.
|
|
53
|
+
"@alxia/core": "^0.21.1",
|
|
54
|
+
"@softistx/janus": ">=0.38.1 <0.57.0",
|
|
55
55
|
"typescript": "^6.0.3 || ^7.0.0"
|
|
56
56
|
}
|
|
57
57
|
}
|