@owlmeans/web-auth 0.1.18-rc.47 → 0.1.18-rc.48
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/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/web-auth/SKILL.md +4 -6
- package/build/auth/plugins/supervisor.d.ts.map +1 -1
- package/build/auth/plugins/supervisor.js +9 -6
- package/build/auth/plugins/supervisor.js.map +1 -1
- package/package.json +11 -10
- package/src/auth/plugins/supervisor.tsx +10 -6
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
6
6
|
your project's skill store (`.agents/skills/`):
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
9
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.34
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
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/web-auth",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-09-
|
|
4
|
+
"version": "0.1.18-rc.48",
|
|
5
|
+
"generatedAt": "2026-09-22T20:45:24.050Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/web-auth
|
|
9
9
|
|
|
10
10
|
**Layer:** Web
|
|
11
|
-
**Install:** `"@owlmeans/web-auth": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/web-auth": "^0.1.18-rc.48"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Web-side auth UI plugins registering into the shared `@owlmeans/client-auth/manager` plugin registry
|
|
14
14
|
(mirroring `@owlmeans/web-oidc-rp`). It ships the **PK supervisor** login form.
|
|
@@ -55,11 +55,9 @@ because it is a tool rather than a way in. Test ids: `supervisor-auth-form`, `su
|
|
|
55
55
|
|
|
56
56
|
On submit the form requests a fresh allowance, signs `buildSupervisorPayload(challenge, userId,
|
|
57
57
|
salt)` with the entered private key, packs `{ salt, signature }` as the credential, exchanges the
|
|
58
|
-
resulting token through the client `AuthService`, and navigates
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
longer imports `@owlmeans/client-flow` or `@owlmeans/web-client` directly; `landAfterLogin` is the
|
|
62
|
-
whole decision.
|
|
58
|
+
resulting token through the client `AuthService`, and navigates to the landing a screen suspended in
|
|
59
|
+
`@owlmeans/client-flow` (`resumeSuspendedFlow` — an OAuth consent screen reached signed out, say),
|
|
60
|
+
else to `HOME`.
|
|
63
61
|
|
|
64
62
|
See the **supervisor-auth** skill for the whole feature — the server append, its options, the
|
|
65
63
|
security boundary and the `@owlmeans/test-ui` helpers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAYjF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAgFpC,CAAA"}
|
|
@@ -3,7 +3,8 @@ import { useState } from 'react';
|
|
|
3
3
|
import { AuthenticationType, buildSupervisorPayload } from '@owlmeans/auth';
|
|
4
4
|
import { DEFAULT_ALIAS as AUTH_SERVICE } from '@owlmeans/client-auth';
|
|
5
5
|
import { useContext } from '@owlmeans/client';
|
|
6
|
-
import {
|
|
6
|
+
import { resumeSuspendedFlow } from '@owlmeans/client-flow';
|
|
7
|
+
import { HOME } from '@owlmeans/web-client';
|
|
7
8
|
import { makeKeyPairModel } from '@owlmeans/basic-keys';
|
|
8
9
|
import { createIdOfLength } from '@owlmeans/basic-ids';
|
|
9
10
|
/**
|
|
@@ -43,11 +44,13 @@ export const supervisorClientPlugin = {
|
|
|
43
44
|
const authService = context.service(AUTH_SERVICE);
|
|
44
45
|
await authService.authenticate(token);
|
|
45
46
|
}
|
|
46
|
-
// A
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
47
|
+
// A device or authorization-code consent screen may have suspended itself here before
|
|
48
|
+
// sending the browser to sign in; resuming it takes priority over the app's own home.
|
|
49
|
+
const landing = await resumeSuspendedFlow(context);
|
|
50
|
+
const target = landing != null
|
|
51
|
+
? await context.entrypoint(landing.entrypoint).url({ query: landing.query }, { absolute: true })
|
|
52
|
+
: await context.entrypoint(HOME).url(undefined, { absolute: true });
|
|
53
|
+
window.location.href = target;
|
|
51
54
|
}
|
|
52
55
|
catch (e) {
|
|
53
56
|
setError(e instanceof Error ? e.message : String(e));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGhC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,OAAO,EAAE,aAAa,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGhC,OA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,CAAC,CAAC,IAAI,IAC1G,CACR,CAAA;IACH,CAAC;IAED,+EAA+E;IAC/E,8EAA8E;IAC9E,0EAA0E;IAC1E,YAAY,EAAE,KAAK,EAAE,WAAW,EAAsB,EAAE;QACtD,MAAM,GAAG,GAAG,gBAAgB,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;QACpD,MAAM,IAAI,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAA;QACjC,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,SAAS,IAAI,EAAE,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;QAC/G,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;QAE5D,8EAA8E;QAC9E,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IACtB,CAAC;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/web-auth",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.48",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -29,15 +29,16 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@owlmeans/auth": "^0.1.18-rc.
|
|
33
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
34
|
-
"@owlmeans/basic-ids": "^0.1.18-rc.
|
|
35
|
-
"@owlmeans/basic-keys": "^0.1.18-rc.
|
|
36
|
-
"@owlmeans/client": "^0.1.18-rc.
|
|
37
|
-
"@owlmeans/client-auth": "^0.1.18-rc.
|
|
38
|
-
"@owlmeans/
|
|
39
|
-
"@owlmeans/
|
|
40
|
-
"@owlmeans/
|
|
32
|
+
"@owlmeans/auth": "^0.1.18-rc.32",
|
|
33
|
+
"@owlmeans/auth-common": "^0.1.18-rc.34",
|
|
34
|
+
"@owlmeans/basic-ids": "^0.1.18-rc.31",
|
|
35
|
+
"@owlmeans/basic-keys": "^0.1.18-rc.35",
|
|
36
|
+
"@owlmeans/client": "^0.1.18-rc.37",
|
|
37
|
+
"@owlmeans/client-auth": "^0.1.18-rc.44",
|
|
38
|
+
"@owlmeans/client-flow": "^0.1.18-rc.40",
|
|
39
|
+
"@owlmeans/config": "^0.1.18-rc.34",
|
|
40
|
+
"@owlmeans/context": "^0.1.18-rc.30",
|
|
41
|
+
"@owlmeans/web-client": "^0.1.18-rc.47"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
44
|
"react": "*"
|
|
@@ -6,7 +6,9 @@ import type { AuthToken } from '@owlmeans/auth'
|
|
|
6
6
|
import { DEFAULT_ALIAS as AUTH_SERVICE } from '@owlmeans/client-auth'
|
|
7
7
|
import type { AuthService } from '@owlmeans/auth-common'
|
|
8
8
|
import { useContext } from '@owlmeans/client'
|
|
9
|
-
import {
|
|
9
|
+
import { resumeSuspendedFlow } from '@owlmeans/client-flow'
|
|
10
|
+
import { HOME } from '@owlmeans/web-client'
|
|
11
|
+
import type { Module } from '@owlmeans/web-client'
|
|
10
12
|
import { makeKeyPairModel } from '@owlmeans/basic-keys'
|
|
11
13
|
import { createIdOfLength } from '@owlmeans/basic-ids'
|
|
12
14
|
|
|
@@ -53,11 +55,13 @@ export const supervisorClientPlugin: AuthenticationPlugin = {
|
|
|
53
55
|
await authService.authenticate(token)
|
|
54
56
|
}
|
|
55
57
|
|
|
56
|
-
// A
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
58
|
+
// A device or authorization-code consent screen may have suspended itself here before
|
|
59
|
+
// sending the browser to sign in; resuming it takes priority over the app's own home.
|
|
60
|
+
const landing = await resumeSuspendedFlow(context)
|
|
61
|
+
const target = landing != null
|
|
62
|
+
? await context.entrypoint<Module<string>>(landing.entrypoint).url({ query: landing.query }, { absolute: true })
|
|
63
|
+
: await context.entrypoint<Module<string>>(HOME).url(undefined, { absolute: true })
|
|
64
|
+
window.location.href = target
|
|
61
65
|
} catch (e) {
|
|
62
66
|
setError(e instanceof Error ? e.message : String(e))
|
|
63
67
|
setBusy(false)
|