seamless-cli 0.12.1 → 0.14.0
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 +98 -26
- package/dist/commands/adminShared.js +43 -0
- package/dist/commands/adminShared.js.map +1 -1
- package/dist/commands/check.js +67 -42
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/config.js +7 -2
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/helpTopics.js +35 -13
- package/dist/commands/helpTopics.js.map +1 -1
- package/dist/commands/init.js +71 -42
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/org.js +9 -3
- package/dist/commands/org.js.map +1 -1
- package/dist/commands/sessions.js +8 -3
- package/dist/commands/sessions.js.map +1 -1
- package/dist/commands/users.js +6 -10
- package/dist/commands/users.js.map +1 -1
- package/dist/commands/verify.js +3 -2
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/whoami.js +21 -3
- package/dist/commands/whoami.js.map +1 -1
- package/dist/core/admin.js +20 -4
- package/dist/core/admin.js.map +1 -1
- package/dist/core/authClient.js +71 -5
- package/dist/core/authClient.js.map +1 -1
- package/dist/core/config.js +55 -3
- package/dist/core/config.js.map +1 -1
- package/dist/core/errors.js +32 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/fetch.js +17 -1
- package/dist/core/fetch.js.map +1 -1
- package/dist/core/images.js +9 -3
- package/dist/core/images.js.map +1 -1
- package/dist/core/interactiveLogin.js +12 -13
- package/dist/core/interactiveLogin.js.map +1 -1
- package/dist/core/jwksKid.js +40 -0
- package/dist/core/jwksKid.js.map +1 -0
- package/dist/core/keychain.js +13 -26
- package/dist/core/keychain.js.map +1 -1
- package/dist/core/loginFlow.js +39 -14
- package/dist/core/loginFlow.js.map +1 -1
- package/dist/core/output.js +9 -29
- package/dist/core/output.js.map +1 -1
- package/dist/core/redact.js +68 -0
- package/dist/core/redact.js.map +1 -0
- package/dist/core/secrets.js +0 -3
- package/dist/core/secrets.js.map +1 -1
- package/dist/core/systemConfig.js +39 -4
- package/dist/core/systemConfig.js.map +1 -1
- package/dist/core/templates.js +6 -4
- package/dist/core/templates.js.map +1 -1
- package/dist/generators/admin/admin.js +102 -1
- package/dist/generators/admin/admin.js.map +1 -1
- package/dist/generators/auth/auth.js +2 -59
- package/dist/generators/auth/auth.js.map +1 -1
- package/dist/generators/docker/docker.js +0 -20
- package/dist/generators/docker/docker.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/prompts/projectSetup.js +1 -12
- package/dist/prompts/projectSetup.js.map +1 -1
- package/package.json +2 -2
- package/verify/adapter-app/package.json +1 -1
- package/verify/adapter-fastify-app/package.json +1 -1
- package/verify/docker-compose.verify.yml +22 -20
- package/dist/core/jwks.js +0 -19
- package/dist/core/jwks.js.map +0 -1
- package/dist/utils/writeEnv.js +0 -9
- package/dist/utils/writeEnv.js.map +0 -1
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# Conformance stack for `seamless verify`.
|
|
2
|
-
# Brings up Postgres + the auth API + the Express adapter from local source
|
|
3
|
-
# (paths supplied by the verify command via env) so the Playwright harness can
|
|
4
|
-
# drive every auth flow. NODE_ENV=test enables the API's external-delivery seam
|
|
5
|
-
# so OTP / magic-link tokens are returned in responses (no real email/SMS).
|
|
6
2
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
3
|
+
# Postgres, the auth API built from local source, and two adopter backends that are
|
|
4
|
+
# deliberate twins (Express on 3000, Fastify on 3001) so a failure is attributable to
|
|
5
|
+
# one framework. The web starter is behind the `react` profile, since the api and
|
|
6
|
+
# adapter layers need no browser.
|
|
7
|
+
#
|
|
8
|
+
# Env comes from the `seamless verify` process, not a file:
|
|
9
|
+
# SEAMLESS_API_DIR absolute path to the seamless-auth-api source (build context)
|
|
10
|
+
# SEAMLESS_REACT_DIR absolute path to the web template to serve (react profile only)
|
|
11
|
+
# API_SERVICE_TOKEN shared secret between the API and both adapters
|
|
12
|
+
# JWKS_KID key id the adapters expect (must match the API's active kid)
|
|
13
|
+
# OWNER_EMAIL tenant owner; this email gets the admin role at signup
|
|
14
|
+
#
|
|
15
|
+
# The adapters are built from ./adapter-app and ./adapter-fastify-app in this repo,
|
|
16
|
+
# so they take no path from the environment.
|
|
13
17
|
|
|
14
18
|
name: seamless-verify
|
|
15
19
|
|
|
@@ -30,19 +34,17 @@ services:
|
|
|
30
34
|
retries: 20
|
|
31
35
|
|
|
32
36
|
auth-api:
|
|
33
|
-
# Built with the production Dockerfile (compiles dist/)
|
|
34
|
-
#
|
|
35
|
-
# is skipped. validateEnvs.sh gates startup on the env below.
|
|
37
|
+
# Built with the production Dockerfile (compiles dist/). Its validateEnvs.sh
|
|
38
|
+
# entrypoint runs the migrations and gates startup on the env below.
|
|
36
39
|
build:
|
|
37
40
|
context: ${SEAMLESS_API_DIR}
|
|
38
41
|
dockerfile: Dockerfile
|
|
39
42
|
ports:
|
|
40
43
|
- '5312:5312'
|
|
41
44
|
environment:
|
|
42
|
-
# `development
|
|
43
|
-
# auto-generated dev public key
|
|
44
|
-
#
|
|
45
|
-
# JWKS publication working so the adapter/SDKs can verify tokens.
|
|
45
|
+
# `development`, not `test`: signing treats any non-production env as dev, but
|
|
46
|
+
# the JWKS endpoint only serves the auto-generated dev public key under
|
|
47
|
+
# `development`. The adapters and SDKs need that key to verify tokens.
|
|
46
48
|
NODE_ENV: development
|
|
47
49
|
PORT: '5312'
|
|
48
50
|
APP_NAME: Seamless Verify
|
|
@@ -54,9 +56,9 @@ services:
|
|
|
54
56
|
DEFAULT_ROLES: user
|
|
55
57
|
AVAILABLE_ROLES: user,admin
|
|
56
58
|
LOGIN_METHODS: passkey,magic_link,email_otp,phone_otp,oauth
|
|
57
|
-
#
|
|
58
|
-
#
|
|
59
|
-
#
|
|
59
|
+
# The base URL for emailed magic links, required at boot: with a fresh DB
|
|
60
|
+
# there is no seeded system_config row to fall back on, so the server exits
|
|
61
|
+
# without it. The browser-visible web app runs on 5173.
|
|
60
62
|
FRONTEND_URL: http://localhost:5173
|
|
61
63
|
DB_LOGGING: 'false'
|
|
62
64
|
ACCESS_TOKEN_TTL: 15m
|
package/dist/core/jwks.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { generateKeyPairSync } from "crypto";
|
|
2
|
-
export function generateJWKS() {
|
|
3
|
-
const { publicKey, privateKey } = generateKeyPairSync("rsa", {
|
|
4
|
-
modulusLength: 2048,
|
|
5
|
-
publicKeyEncoding: {
|
|
6
|
-
type: "spki",
|
|
7
|
-
format: "pem",
|
|
8
|
-
},
|
|
9
|
-
privateKeyEncoding: {
|
|
10
|
-
type: "pkcs8",
|
|
11
|
-
format: "pem",
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
return {
|
|
15
|
-
publicKey,
|
|
16
|
-
privateKey,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=jwks.js.map
|
package/dist/core/jwks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jwks.js","sourceRoot":"","sources":["../../src/core/jwks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,UAAU,YAAY;IAC1B,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,mBAAmB,CAAC,KAAK,EAAE;QAC3D,aAAa,EAAE,IAAI;QACnB,iBAAiB,EAAE;YACjB,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,KAAK;SACd;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,KAAK;SACd;KACF,CAAC,CAAC;IAEH,OAAO;QACL,SAAS;QACT,UAAU;KACX,CAAC;AACJ,CAAC"}
|
package/dist/utils/writeEnv.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
export function writeEnv(dir, values) {
|
|
4
|
-
const env = Object.entries(values)
|
|
5
|
-
.map(([k, v]) => `${k}=${v}`)
|
|
6
|
-
.join("\n");
|
|
7
|
-
fs.writeFileSync(path.join(dir, ".env"), env + "\n");
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=writeEnv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"writeEnv.js","sourceRoot":"","sources":["../../src/utils/writeEnv.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,UAAU,QAAQ,CAAC,GAAW,EAAE,MAA2B;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SAC/B,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC,CAAC;AACvD,CAAC"}
|