@driveflux/auth 4.0.63 → 4.0.65

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.
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-business-development.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-business-development.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,4CAA4C,GACxD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAS5C,CAAA"}
1
+ {"version":3,"file":"head-of-business-development.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-business-development.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,4CAA4C,GACxD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-engineering.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-engineering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,oCAAoC,GAChD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
1
+ {"version":3,"file":"head-of-engineering.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-engineering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,oCAAoC,GAChD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAW5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-finance.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-finance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,gCAAgC,GAC5C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAK5C,CAAA"}
1
+ {"version":3,"file":"head-of-finance.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-finance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,gCAAgC,GAC5C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAM5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-human-resources.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-human-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,uCAAuC,GACnD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAS5C,CAAA"}
1
+ {"version":3,"file":"head-of-human-resources.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-human-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,uCAAuC,GACnD,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-marketing.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-marketing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,kCAAkC,GAC9C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAS5C,CAAA"}
1
+ {"version":3,"file":"head-of-marketing.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-marketing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,kCAAkC,GAC9C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-operations.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,mCAAmC,GAC/C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAM5C,CAAA"}
1
+ {"version":3,"file":"head-of-operations.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,mCAAmC,GAC/C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAO5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-product.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,gCAAgC,GAC5C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
1
+ {"version":3,"file":"head-of-product.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,gCAAgC,GAC5C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAW5C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"head-of-sales.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-sales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,8BAA8B,GAC1C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAS5C,CAAA"}
1
+ {"version":3,"file":"head-of-sales.d.ts","sourceRoot":"","sources":["../../../../src/authorization/roles/admin/head-of-sales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,8BAA8B,GAC1C,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,EACtC,QAAQ,cAAc,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,kBAU5C,CAAA"}
@@ -1,9 +1,9 @@
1
- export declare const AUTH_COOKIE_PREFIX = "flux-auth";
2
- export declare const AUTH_COOKIE_ACCESSED_ADMIN = "flux-auth.has-accessed-admin";
3
- export declare const AUTH_COOKIE_SESSION_TOKEN = "flux-auth.session-token";
4
- export declare const AUTH_COOKIE_CALLBACK_URL = "flux-auth.callback-url";
5
- export declare const AUTH_COOKIE_CSRF_TOKEN = "flux-auth.csrf-token";
6
- export declare const AUTH_COOKIE_PKCE_CODE_VERIFIER = "flux-auth.pkce.code_verifier";
7
- export declare const AUTH_COOKIE_STATE = "flux-auth.state";
8
- export declare const AUTH_COOKIE_NONCE = "flux-auth.nonce";
1
+ export declare const AUTH_COOKIE_PREFIX: string;
2
+ export declare const AUTH_COOKIE_ACCESSED_ADMIN: string;
3
+ export declare const AUTH_COOKIE_SESSION_TOKEN: string;
4
+ export declare const AUTH_COOKIE_CALLBACK_URL: string;
5
+ export declare const AUTH_COOKIE_CSRF_TOKEN: string;
6
+ export declare const AUTH_COOKIE_PKCE_CODE_VERIFIER: string;
7
+ export declare const AUTH_COOKIE_STATE: string;
8
+ export declare const AUTH_COOKIE_NONCE: string;
9
9
  export declare const PROBLEM_INVALID_LOGIN = "invalid_credentials";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,cAAc,CAAA;AAC7C,eAAO,MAAM,0BAA0B,iCAA6C,CAAA;AACpF,eAAO,MAAM,yBAAyB,4BAAwC,CAAA;AAC9E,eAAO,MAAM,wBAAwB,2BAAuC,CAAA;AAC5E,eAAO,MAAM,sBAAsB,yBAAqC,CAAA;AACxE,eAAO,MAAM,8BAA8B,iCAA6C,CAAA;AACxF,eAAO,MAAM,iBAAiB,oBAAgC,CAAA;AAC9D,eAAO,MAAM,iBAAiB,oBAAgC,CAAA;AAC9D,eAAO,MAAM,qBAAqB,wBAAwB,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,QAEjB,CAAA;AAEd,eAAO,MAAM,0BAA0B,QAA6C,CAAA;AACpF,eAAO,MAAM,yBAAyB,QAAwC,CAAA;AAC9E,eAAO,MAAM,wBAAwB,QAAuC,CAAA;AAC5E,eAAO,MAAM,sBAAsB,QAAqC,CAAA;AACxE,eAAO,MAAM,8BAA8B,QAA6C,CAAA;AACxF,eAAO,MAAM,iBAAiB,QAAgC,CAAA;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAA;AAC9D,eAAO,MAAM,qBAAqB,wBAAwB,CAAA"}
package/dist/constants.js CHANGED
@@ -1,4 +1,5 @@
1
- export const AUTH_COOKIE_PREFIX = 'flux-auth';
1
+ const envSuffux = process.env.APP_ENV === 'production' ? '' : process.env.APP_ENV ?? '';
2
+ export const AUTH_COOKIE_PREFIX = envSuffux ? `flux-auth.${envSuffux}` : 'flux-auth';
2
3
  export const AUTH_COOKIE_ACCESSED_ADMIN = `${AUTH_COOKIE_PREFIX}.has-accessed-admin`;
3
4
  export const AUTH_COOKIE_SESSION_TOKEN = `${AUTH_COOKIE_PREFIX}.session-token`;
4
5
  export const AUTH_COOKIE_CALLBACK_URL = `${AUTH_COOKIE_PREFIX}.callback-url`;
@@ -37,7 +37,7 @@ export declare const authOptions: {
37
37
  };
38
38
  credentials?: Record<string, import("next-auth/providers/credentials").CredentialInput>;
39
39
  }) => Promise<boolean>;
40
- readonly session: ({ session, user, trigger, token, ...others }: {
40
+ readonly session: ({ session, user, trigger }: {
41
41
  session: import("next-auth").Session;
42
42
  token: import("next-auth/jwt").JWT;
43
43
  user: import("next-auth/adapters").AdapterUser;
@@ -358,7 +358,7 @@ export declare const authOptions: {
358
358
  };
359
359
  readonly cookies: {
360
360
  readonly sessionToken: {
361
- readonly name: "flux-auth.session-token";
361
+ readonly name: string;
362
362
  readonly options: {
363
363
  readonly httpOnly: true;
364
364
  readonly sameSite: "lax";
@@ -368,7 +368,7 @@ export declare const authOptions: {
368
368
  };
369
369
  };
370
370
  readonly callbackUrl: {
371
- readonly name: "flux-auth.callback-url";
371
+ readonly name: string;
372
372
  readonly options: {
373
373
  readonly httpOnly: true;
374
374
  readonly sameSite: "lax";
@@ -377,7 +377,7 @@ export declare const authOptions: {
377
377
  };
378
378
  };
379
379
  readonly csrfToken: {
380
- readonly name: "flux-auth.csrf-token" | "__Host-flux-auth.csrf-token";
380
+ readonly name: string;
381
381
  readonly options: {
382
382
  readonly httpOnly: true;
383
383
  readonly sameSite: "lax";
@@ -386,7 +386,7 @@ export declare const authOptions: {
386
386
  };
387
387
  };
388
388
  readonly pkceCodeVerifier: {
389
- readonly name: "flux-auth.pkce.code_verifier";
389
+ readonly name: string;
390
390
  readonly options: {
391
391
  readonly httpOnly: true;
392
392
  readonly sameSite: "lax";
@@ -396,7 +396,7 @@ export declare const authOptions: {
396
396
  };
397
397
  };
398
398
  readonly state: {
399
- readonly name: "flux-auth.state";
399
+ readonly name: string;
400
400
  readonly options: {
401
401
  readonly httpOnly: true;
402
402
  readonly sameSite: "lax";
@@ -406,7 +406,7 @@ export declare const authOptions: {
406
406
  };
407
407
  };
408
408
  readonly nonce: {
409
- readonly name: "flux-auth.nonce";
409
+ readonly name: string;
410
410
  readonly options: {
411
411
  readonly httpOnly: true;
412
412
  readonly sameSite: "lax";
@@ -1 +1 @@
1
- {"version":3,"file":"next-auth.d.ts","sourceRoot":"","sources":["../../src/server/next-auth.ts"],"names":[],"mappings":"AAEA,OAAO,qBAAqB,CAAA;AAK5B,OAAO,KAAK,EAAE,IAAI,IAAI,WAAW,EAAmB,MAAM,WAAW,CAAA;AA4BrE,eAAO,MAAM,oBAAoB,GAChC,MAAM,WAAW,KACf,OAAO,CAAC,MAAM,CAehB,CAAA;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;2BAQlB,MAAM,CAAC,UAAU,GAAG,OAAO,EAAE,MAAM,CAAC,GAAG,SAAS,GAC3D,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;CAQ/B,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;mCAyRijG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADh4E,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/auth",
3
- "version": "4.0.63",
3
+ "version": "4.0.65",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -75,7 +75,7 @@
75
75
  "@casl/ability": "^6.7.3",
76
76
  "@casl/prisma": "^1.5.2",
77
77
  "@driveflux/config": "3.0.9",
78
- "@driveflux/db": "4.0.38",
78
+ "@driveflux/db": "4.0.40",
79
79
  "@driveflux/fetch": "8.0.1",
80
80
  "@driveflux/problem": "6.0.1",
81
81
  "@driveflux/reporter": "7.0.2",