@augmenting-integrations/auth 6.0.0 → 8.0.1

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.
@@ -0,0 +1,63 @@
1
+ export type TenantRole = "apex" | "spoke";
2
+ export type TenantPublicConfig = {
3
+ /** The tenant apex FQDN, e.g. "agency.aillc.link". */
4
+ apex: string;
5
+ /**
6
+ * Cookie Domain attribute. Always the apex (no leading dot needed -- the
7
+ * browser implies it for shared cookies). Auth.js session cookie and the
8
+ * theme x-theme/x-theme-variant cookies use this. Without it cookies are
9
+ * host-only and the subdomain ecosystem breaks.
10
+ */
11
+ cookieDomain: string;
12
+ /**
13
+ * The registrable parent domain (e.g. "aillc.link"). Used by the auth
14
+ * redirect callback to validate post-login callbacks back to any subdomain
15
+ * of the tenant. Distinct from cookieDomain in two-level apex setups.
16
+ */
17
+ parentDomain: string;
18
+ /** AWS region. Default: us-east-1. */
19
+ region: string;
20
+ /**
21
+ * For spoke apps: this spoke's slug (matches app registry primary key).
22
+ * For apex: undefined.
23
+ */
24
+ appSlug?: string;
25
+ /**
26
+ * For spoke apps: this spoke's FQDN (e.g. "leads.agency.aillc.link").
27
+ * For apex: same as `apex`.
28
+ */
29
+ appDomain: string;
30
+ /** "apex" or "spoke". Affects which secret-arn fields are required. */
31
+ role: TenantRole;
32
+ };
33
+ export type TenantServerConfig = TenantPublicConfig & {
34
+ /** AUTH_SECRET ARN in Secrets Manager. Used by createAuth(). */
35
+ authSecretArn: string;
36
+ /** App registry DynamoDB table name. Apex owns the table; spokes read. */
37
+ registryTable: string;
38
+ /** Cognito client secret ARN. Apex only -- spokes don't run the OAuth dance. */
39
+ authCognitoSecretArn?: string;
40
+ /** Cognito issuer URL (apex only). */
41
+ cognitoIssuer?: string;
42
+ /** Cognito client ID (apex only). */
43
+ cognitoClientId?: string;
44
+ /** Comma-separated admin emails (auto-promoted on first sign-in). */
45
+ adminEmails?: string;
46
+ /** Aurora connection secret ARN (spoke only). */
47
+ dbSecretArn?: string;
48
+ /** Aurora endpoint host (spoke only). */
49
+ dbHost?: string;
50
+ /** Aurora database name (spoke only). */
51
+ dbName?: string;
52
+ /** Stripe credentials bundle ARN (spoke that does billing). */
53
+ stripeSecretArn?: string;
54
+ /** Stripe webhook signing secret ARN (spoke that does billing). */
55
+ stripeWebhookSecretArn?: string;
56
+ };
57
+ export declare const TENANT_GLOBAL_KEY: "__TENANT__";
58
+ declare global {
59
+ interface Window {
60
+ [TENANT_GLOBAL_KEY]?: TenantPublicConfig;
61
+ }
62
+ }
63
+ //# sourceMappingURL=tenant-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant-types.d.ts","sourceRoot":"","sources":["../src/tenant-types.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,uEAAuE;IACvE,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG;IACpD,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,sCAAsC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAG,YAAqB,CAAC;AAEvD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,CAAC,iBAAiB,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC1C;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augmenting-integrations/auth",
3
- "version": "6.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "Auth.js v5 factory + JIT user provisioning + impersonation + client-side user menu / sign-out. Subpath exports: /server (createAuth, JIT, impersonation token mint/verify) and /client (AppUserProvider, useAppUser, UserMenu, SignOutButton, ImpersonationBanner).",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -33,7 +33,7 @@
33
33
  "next": "^16.0.0",
34
34
  "next-auth": "^5.0.0-beta.31",
35
35
  "react": "^19.0.0",
36
- "@augmenting-integrations/aws": "6.0.0"
36
+ "@augmenting-integrations/aws": "8.0.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/react": "^19.0.0",
@@ -43,7 +43,7 @@
43
43
  "tsup": "^8.3.5",
44
44
  "typescript": "^5.7.2",
45
45
  "vitest": "^4.1.5",
46
- "@augmenting-integrations/aws": "6.0.0"
46
+ "@augmenting-integrations/aws": "8.0.1"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup",