@jskit-ai/auth-web 0.1.164 → 0.1.166
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/auth-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.166",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"./test/playwright": "./src/test/playwright.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@jskit-ai/auth-core": "0.1.
|
|
26
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
27
|
-
"@jskit-ai/kernel": "0.1.
|
|
28
|
-
"@jskit-ai/shell-web": "0.1.
|
|
25
|
+
"@jskit-ai/auth-core": "0.1.164",
|
|
26
|
+
"@jskit-ai/http-runtime": "0.1.164",
|
|
27
|
+
"@jskit-ai/kernel": "0.1.166",
|
|
28
|
+
"@jskit-ai/shell-web": "0.1.170",
|
|
29
29
|
"@mdi/js": "^7.4.47"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -31,8 +31,8 @@ and Playwright auth helper exported by `@jskit-ai/auth-web`. Use auth policies
|
|
|
31
31
|
from `@jskit-ai/auth-core` for server authorization.
|
|
32
32
|
|
|
33
33
|
For a managed preview, copy the app-owned `tools/preview-identity` executable
|
|
34
|
-
and declare it in the project's
|
|
35
|
-
`
|
|
34
|
+
and declare it in the project's Vibe64 Launch target with protocol
|
|
35
|
+
`vibe64.preview-identity.command.v1`. Declare `AUTH_DEV_BYPASS_ENABLED` as its
|
|
36
36
|
Enabled environment and `AUTH_DEV_BYPASS_SECRET` as its Secret environment so
|
|
37
37
|
the preview host supplies fresh launch-scoped values; users do not set those
|
|
38
38
|
values by hand. The executable calls the exported managed-preview identity
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEV_AUTH_SECRET_HEADER } from "@jskit-ai/auth-core/server/devAuth";
|
|
2
2
|
import { AUTH_PATHS } from "@jskit-ai/auth-core/shared/authPaths";
|
|
3
3
|
|
|
4
|
-
const MANAGED_PREVIEW_IDENTITY_PROTOCOL = "
|
|
4
|
+
const MANAGED_PREVIEW_IDENTITY_PROTOCOL = "vibe64.preview-identity.command.v1";
|
|
5
5
|
const MANAGED_PREVIEW_IDENTITY_ENABLED_ENV = "AUTH_DEV_BYPASS_ENABLED";
|
|
6
6
|
const MANAGED_PREVIEW_IDENTITY_SECRET_ENV = "AUTH_DEV_BYPASS_SECRET";
|
|
7
7
|
const MAX_MESSAGE_BYTES = 64 * 1024;
|
|
@@ -18,6 +18,24 @@ function jsonResponse(payload, { cookie = "", status = 200 } = {}) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
test("managed preview identity uses only the Vibe64-owned command protocol", async () => {
|
|
22
|
+
assert.equal(MANAGED_PREVIEW_IDENTITY_PROTOCOL, "vibe64.preview-identity.command.v1");
|
|
23
|
+
|
|
24
|
+
const result = await executeManagedPreviewIdentityRequest({
|
|
25
|
+
operation: "logout",
|
|
26
|
+
protocol: "genesis.preview-identity.command.v1",
|
|
27
|
+
requestId: "retired-protocol",
|
|
28
|
+
target: { origin: "http://localhost:3000" }
|
|
29
|
+
}, {
|
|
30
|
+
env: {},
|
|
31
|
+
fetchImpl: async () => assert.fail("fetch must not run")
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
assert.equal(result.ok, false);
|
|
35
|
+
assert.equal(result.protocol, MANAGED_PREVIEW_IDENTITY_PROTOCOL);
|
|
36
|
+
assert.equal(result.code, "jskit_managed_preview_identity_protocol_invalid");
|
|
37
|
+
});
|
|
38
|
+
|
|
21
39
|
test("managed preview identity signs out before selecting an existing application user", async () => {
|
|
22
40
|
const calls = [];
|
|
23
41
|
const responses = [
|