@owlmeans/server-auth-otp 0.1.18-rc.49 → 0.1.18-rc.50
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
CHANGED
|
@@ -12,7 +12,7 @@ Email OTP `AuthPlugin` for OwlMeans servers — passwordless login via time-limi
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/server-auth-otp@^0.1.18-rc.
|
|
15
|
+
bun add @owlmeans/server-auth-otp@^0.1.18-rc.50
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -47,7 +47,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
47
47
|
your project's skill store (`.agents/skills/`):
|
|
48
48
|
|
|
49
49
|
```sh
|
|
50
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
50
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.46
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-auth-otp",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.50",
|
|
5
|
+
"generatedAt": "2026-10-03T11:19:50.781Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ metadata:
|
|
|
8
8
|
|
|
9
9
|
# Using `@owlmeans/server-auth-otp`
|
|
10
10
|
|
|
11
|
-
**Install:** `"@owlmeans/server-auth-otp": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/server-auth-otp": "^0.1.18-rc.50"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Email OTP authentication plugin for the OwlMeans auth-manager plugin system. Relies on `@owlmeans/auth-otp` for the OTP service interface, a Redis resource for code storage, and a `MailerService` to send codes.
|
|
14
14
|
|
|
@@ -71,9 +71,13 @@ appendOtpPlugin(context)
|
|
|
71
71
|
**Authenticate** — client sends `{ challenge: <signed-envelope>, userId: email, credential: '123456', type: 'email-otp', role: AuthRole.User, scopes: [ALL_SCOPES] }`:
|
|
72
72
|
- Envelope is opened → the plugin verifies the opaque issuance and code atomically. Five failed
|
|
73
73
|
attempts invalidate it; one concurrent correct verification can consume it.
|
|
74
|
-
- `IdentityLinkingService`
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
- The `IdentityLinkingService` `cfg.otp.identityAlias` names answers the payload. The identity
|
|
75
|
+
store's own (`AUTH_IDENTITY_LINKING`) follows the e-mail code's credential to the person's
|
|
76
|
+
account, or finds the account by the address — the code becoming another credential on it — or
|
|
77
|
+
registers an account with a personal organization when the address is new; it answers the
|
|
78
|
+
deployment's own row in the account's main organization. An integrated provider's end-user login
|
|
79
|
+
names the e-mail proof linking service instead (`makeEmailProofLinkingService`,
|
|
80
|
+
`@owlmeans/iam-integrated`), which proves the address and writes nothing.
|
|
77
81
|
- Copies `userId`, `profileId`, `entitySlug`, `role` and `scopes` from the resolved payload onto the
|
|
78
82
|
credential, sets `credential.type = AuthenticationType.OneTimeToken`, and returns the signed auth
|
|
79
83
|
token.
|
|
@@ -101,12 +105,11 @@ cfg.otp = {
|
|
|
101
105
|
- Call `appendOtpPlugin(context)` once per context — it adds to the shared plugin registry singleton.
|
|
102
106
|
- `credential.entitySlug` on the authenticate request **selects nothing**. The plugin copies it into
|
|
103
107
|
the linking details as `clientId` (defaulting to `'default'`) and `entityId`, and
|
|
104
|
-
`@owlmeans/server-auth-identity` reads neither: `getLinkedProfile` keys on the
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
organization the token names.
|
|
108
|
+
`@owlmeans/server-auth-identity` reads neither: `getLinkedProfile` keys on the credential built
|
|
109
|
+
from the auth type, the `'email'` service and the address, and `linkProfile` lands on the one
|
|
110
|
+
account of that address (registering it with a personal organization when it is new). Whatever
|
|
111
|
+
the caller sent is then overwritten with the linked payload's own slug before the envelope is
|
|
112
|
+
signed, so the address alone decides which account and which organization the token names.
|
|
110
113
|
- Errors from this plugin are `AuthenFailed` (from `@owlmeans/auth`) — callers catch that, not raw `Error`.
|
|
111
114
|
- Use the email throttle for the public integrated-IAM flow: one issuance per minute and ten per
|
|
112
115
|
hour, with a 429 and Retry-After. The companion IP throttle is available for an ingress that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-auth-otp",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.50",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
25
|
+
"@owlmeans/auth": "^0.1.18-rc.38",
|
|
26
26
|
"@owlmeans/auth-otp": "^0.1.18-rc.32",
|
|
27
27
|
"@owlmeans/context": "^0.1.18-rc.32",
|
|
28
28
|
"@owlmeans/error": "^0.1.18-rc.36",
|
|
29
29
|
"@owlmeans/mailer": "^0.1.18-rc.33",
|
|
30
|
-
"@owlmeans/oidc": "^0.1.18-rc.
|
|
31
|
-
"@owlmeans/redis-resource": "^0.1.18-rc.
|
|
30
|
+
"@owlmeans/oidc": "^0.1.18-rc.52",
|
|
31
|
+
"@owlmeans/redis-resource": "^0.1.18-rc.41",
|
|
32
32
|
"@owlmeans/resource": "^0.1.18-rc.37",
|
|
33
|
-
"@owlmeans/server-auth": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/server-auth-identity": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/server-context": "^0.1.18-rc.
|
|
33
|
+
"@owlmeans/server-auth": "^0.1.18-rc.51",
|
|
34
|
+
"@owlmeans/server-auth-identity": "^0.1.18-rc.44",
|
|
35
|
+
"@owlmeans/server-context": "^0.1.18-rc.40"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@owlmeans/dep-config": "workspace:*",
|