@shware/security 7.1.0 → 7.1.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.
Files changed (153) hide show
  1. package/dist/auth/attributes.cjs +1 -2
  2. package/dist/auth/attributes.d.cts +0 -2
  3. package/dist/auth/attributes.d.cts.map +1 -1
  4. package/dist/auth/attributes.d.mts +0 -2
  5. package/dist/auth/attributes.d.mts.map +1 -1
  6. package/dist/auth/attributes.mjs +1 -2
  7. package/dist/auth/index.cjs +1 -2
  8. package/dist/auth/index.d.cts +0 -2
  9. package/dist/auth/index.d.cts.map +1 -1
  10. package/dist/auth/index.d.mts +0 -2
  11. package/dist/auth/index.d.mts.map +1 -1
  12. package/dist/auth/index.mjs +1 -2
  13. package/dist/auth/types.d.cts +0 -2
  14. package/dist/auth/types.d.cts.map +1 -1
  15. package/dist/auth/types.d.mts +0 -2
  16. package/dist/auth/types.d.mts.map +1 -1
  17. package/dist/core/index.cjs +1 -2
  18. package/dist/core/index.d.cts +0 -2
  19. package/dist/core/index.d.cts.map +1 -1
  20. package/dist/core/index.d.mts +0 -2
  21. package/dist/core/index.d.mts.map +1 -1
  22. package/dist/core/index.mjs +1 -2
  23. package/dist/email/schema.cjs +1 -2
  24. package/dist/email/schema.d.cts +0 -2
  25. package/dist/email/schema.d.cts.map +1 -1
  26. package/dist/email/schema.d.mts +0 -2
  27. package/dist/email/schema.d.mts.map +1 -1
  28. package/dist/email/schema.mjs +1 -2
  29. package/dist/oauth2/client.cjs +1 -2
  30. package/dist/oauth2/client.d.cts +0 -2
  31. package/dist/oauth2/client.d.cts.map +1 -1
  32. package/dist/oauth2/client.d.mts +0 -2
  33. package/dist/oauth2/client.d.mts.map +1 -1
  34. package/dist/oauth2/client.mjs +1 -2
  35. package/dist/oauth2/error.cjs +1 -2
  36. package/dist/oauth2/error.d.cts +0 -2
  37. package/dist/oauth2/error.d.cts.map +1 -1
  38. package/dist/oauth2/error.d.mts +0 -2
  39. package/dist/oauth2/error.d.mts.map +1 -1
  40. package/dist/oauth2/error.mjs +1 -2
  41. package/dist/oauth2/name.cjs +1 -2
  42. package/dist/oauth2/name.d.cts +0 -2
  43. package/dist/oauth2/name.d.cts.map +1 -1
  44. package/dist/oauth2/name.d.mts +0 -2
  45. package/dist/oauth2/name.d.mts.map +1 -1
  46. package/dist/oauth2/name.mjs +1 -2
  47. package/dist/oauth2/provider/apple-client-secret.cjs +1 -2
  48. package/dist/oauth2/provider/apple-client-secret.d.cts +0 -2
  49. package/dist/oauth2/provider/apple-client-secret.d.cts.map +1 -1
  50. package/dist/oauth2/provider/apple-client-secret.d.mts +0 -2
  51. package/dist/oauth2/provider/apple-client-secret.d.mts.map +1 -1
  52. package/dist/oauth2/provider/apple-client-secret.mjs +1 -2
  53. package/dist/oauth2/provider/apple.cjs +1 -2
  54. package/dist/oauth2/provider/apple.d.cts +0 -2
  55. package/dist/oauth2/provider/apple.d.cts.map +1 -1
  56. package/dist/oauth2/provider/apple.d.mts +0 -2
  57. package/dist/oauth2/provider/apple.d.mts.map +1 -1
  58. package/dist/oauth2/provider/apple.mjs +1 -2
  59. package/dist/oauth2/provider/common.cjs +1 -2
  60. package/dist/oauth2/provider/common.d.cts +0 -2
  61. package/dist/oauth2/provider/common.d.cts.map +1 -1
  62. package/dist/oauth2/provider/common.d.mts +0 -2
  63. package/dist/oauth2/provider/common.d.mts.map +1 -1
  64. package/dist/oauth2/provider/common.mjs +1 -2
  65. package/dist/oauth2/provider/facebook.cjs +1 -2
  66. package/dist/oauth2/provider/facebook.d.cts +0 -2
  67. package/dist/oauth2/provider/facebook.d.cts.map +1 -1
  68. package/dist/oauth2/provider/facebook.d.mts +0 -2
  69. package/dist/oauth2/provider/facebook.d.mts.map +1 -1
  70. package/dist/oauth2/provider/facebook.mjs +1 -2
  71. package/dist/oauth2/provider/github.cjs +1 -2
  72. package/dist/oauth2/provider/github.d.cts +0 -2
  73. package/dist/oauth2/provider/github.d.cts.map +1 -1
  74. package/dist/oauth2/provider/github.d.mts +0 -2
  75. package/dist/oauth2/provider/github.d.mts.map +1 -1
  76. package/dist/oauth2/provider/github.mjs +1 -2
  77. package/dist/oauth2/provider/google.cjs +1 -2
  78. package/dist/oauth2/provider/google.d.cts +0 -2
  79. package/dist/oauth2/provider/google.d.cts.map +1 -1
  80. package/dist/oauth2/provider/google.d.mts +0 -2
  81. package/dist/oauth2/provider/google.d.mts.map +1 -1
  82. package/dist/oauth2/provider/google.mjs +1 -2
  83. package/dist/oauth2/provider/wechat.cjs +1 -2
  84. package/dist/oauth2/provider/wechat.d.cts +0 -2
  85. package/dist/oauth2/provider/wechat.d.cts.map +1 -1
  86. package/dist/oauth2/provider/wechat.d.mts +0 -2
  87. package/dist/oauth2/provider/wechat.d.mts.map +1 -1
  88. package/dist/oauth2/provider/wechat.mjs +1 -2
  89. package/dist/oauth2/provider/x.cjs +1 -2
  90. package/dist/oauth2/provider/x.d.cts +0 -2
  91. package/dist/oauth2/provider/x.d.cts.map +1 -1
  92. package/dist/oauth2/provider/x.d.mts +0 -2
  93. package/dist/oauth2/provider/x.d.mts.map +1 -1
  94. package/dist/oauth2/provider/x.mjs +1 -2
  95. package/dist/oauth2/types.cjs +1 -2
  96. package/dist/oauth2/types.d.cts +0 -2
  97. package/dist/oauth2/types.d.cts.map +1 -1
  98. package/dist/oauth2/types.d.mts +0 -2
  99. package/dist/oauth2/types.d.mts.map +1 -1
  100. package/dist/oauth2/types.mjs +1 -2
  101. package/dist/session/common.cjs +1 -2
  102. package/dist/session/common.d.cts +0 -2
  103. package/dist/session/common.d.cts.map +1 -1
  104. package/dist/session/common.d.mts +0 -2
  105. package/dist/session/common.d.mts.map +1 -1
  106. package/dist/session/common.mjs +1 -2
  107. package/dist/session/db.cjs +1 -2
  108. package/dist/session/db.d.cts +0 -2
  109. package/dist/session/db.d.cts.map +1 -1
  110. package/dist/session/db.d.mts +0 -2
  111. package/dist/session/db.d.mts.map +1 -1
  112. package/dist/session/db.mjs +1 -2
  113. package/dist/session/map-session.cjs +1 -2
  114. package/dist/session/map-session.d.cts +0 -2
  115. package/dist/session/map-session.d.cts.map +1 -1
  116. package/dist/session/map-session.d.mts +0 -2
  117. package/dist/session/map-session.d.mts.map +1 -1
  118. package/dist/session/map-session.mjs +1 -2
  119. package/dist/session/redis.cjs +1 -2
  120. package/dist/session/redis.d.cts +0 -2
  121. package/dist/session/redis.d.cts.map +1 -1
  122. package/dist/session/redis.d.mts +0 -2
  123. package/dist/session/redis.d.mts.map +1 -1
  124. package/dist/session/redis.mjs +1 -2
  125. package/dist/session/types.d.cts +0 -2
  126. package/dist/session/types.d.cts.map +1 -1
  127. package/dist/session/types.d.mts +0 -2
  128. package/dist/session/types.d.mts.map +1 -1
  129. package/dist/utils/http.cjs +1 -2
  130. package/dist/utils/http.d.cts +0 -2
  131. package/dist/utils/http.d.cts.map +1 -1
  132. package/dist/utils/http.d.mts +0 -2
  133. package/dist/utils/http.d.mts.map +1 -1
  134. package/dist/utils/http.mjs +1 -2
  135. package/dist/utils/oauth2.cjs +1 -2
  136. package/dist/utils/oauth2.d.cts +0 -2
  137. package/dist/utils/oauth2.d.cts.map +1 -1
  138. package/dist/utils/oauth2.d.mts +0 -2
  139. package/dist/utils/oauth2.d.mts.map +1 -1
  140. package/dist/utils/oauth2.mjs +1 -2
  141. package/dist/utils/timing.cjs +1 -2
  142. package/dist/utils/timing.d.cts +0 -2
  143. package/dist/utils/timing.d.cts.map +1 -1
  144. package/dist/utils/timing.d.mts +0 -2
  145. package/dist/utils/timing.d.mts.map +1 -1
  146. package/dist/utils/timing.mjs +1 -2
  147. package/dist/utils/valid.cjs +1 -2
  148. package/dist/utils/valid.d.cts +0 -2
  149. package/dist/utils/valid.d.cts.map +1 -1
  150. package/dist/utils/valid.d.mts +0 -2
  151. package/dist/utils/valid.d.mts.map +1 -1
  152. package/dist/utils/valid.mjs +1 -2
  153. package/package.json +3 -3
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let zod_mini = require("zod/mini");
3
- //#region src/auth/attributes.ts
3
+ // src/auth/attributes.ts
4
4
  /** Upper bound on serialized attributes: they ride in a session or a request body. */
5
5
  const MAX_ATTRIBUTES_BYTES = 2048;
6
6
  function attributesSize(attributes) {
@@ -22,7 +22,6 @@ function bodyAttributes(body) {
22
22
  if (!parsed.success) return null;
23
23
  return parsed.data ?? {};
24
24
  }
25
- //#endregion
26
25
  exports.MAX_ATTRIBUTES_BYTES = MAX_ATTRIBUTES_BYTES;
27
26
  exports.attributesSchema = attributesSchema;
28
27
  exports.attributesSize = attributesSize;
@@ -1,4 +1,3 @@
1
- //#region src/auth/attributes.d.ts
2
1
  /** Upper bound on serialized attributes: they ride in a session or a request body. */
3
2
  export declare const MAX_ATTRIBUTES_BYTES = 2048;
4
3
  export declare function attributesSize(attributes: Record<string, string>): number;
@@ -13,5 +12,4 @@ export declare const attributesSchema: import("zod/mini").ZodMiniOptional<import
13
12
  * present but invalid.
14
13
  */
15
14
  export declare function bodyAttributes(body: unknown): Record<string, string> | null;
16
- //#endregion
17
15
  //# sourceMappingURL=attributes.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.cts","names":[],"sources":["../../src/auth/attributes.ts"],"mappings":";;qBAGa;wBAEG,eAAe,YAAY;;;;;;qBAS9B,qCAAgB,mCAAA,iCAAA,0CAAA;;;;;wBAYb,eAAe,gBAAgB"}
1
+ {"version":3,"file":"attributes.d.cts","names":[],"sources":["../../src/auth/attributes.ts"],"mappings":";qBAGa;wBAEG,eAAe,YAAY;;;;;;qBAS9B,qCAAgB,mCAAA,iCAAA,0CAAA;;;;;wBAYb,eAAe,gBAAgB"}
@@ -1,4 +1,3 @@
1
- //#region src/auth/attributes.d.ts
2
1
  /** Upper bound on serialized attributes: they ride in a session or a request body. */
3
2
  export declare const MAX_ATTRIBUTES_BYTES = 2048;
4
3
  export declare function attributesSize(attributes: Record<string, string>): number;
@@ -13,5 +12,4 @@ export declare const attributesSchema: import("zod/mini").ZodMiniOptional<import
13
12
  * present but invalid.
14
13
  */
15
14
  export declare function bodyAttributes(body: unknown): Record<string, string> | null;
16
- //#endregion
17
15
  //# sourceMappingURL=attributes.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.mts","names":[],"sources":["../../src/auth/attributes.ts"],"mappings":";;qBAGa;wBAEG,eAAe,YAAY;;;;;;qBAS9B,qCAAgB,mCAAA,iCAAA,0CAAA;;;;;wBAYb,eAAe,gBAAgB"}
1
+ {"version":3,"file":"attributes.d.mts","names":[],"sources":["../../src/auth/attributes.ts"],"mappings":";qBAGa;wBAEG,eAAe,YAAY;;;;;;qBAS9B,qCAAgB,mCAAA,iCAAA,0CAAA;;;;;wBAYb,eAAe,gBAAgB"}
@@ -1,5 +1,5 @@
1
1
  import { optional, record, refine, string } from "zod/mini";
2
- //#region src/auth/attributes.ts
2
+ // src/auth/attributes.ts
3
3
  /** Upper bound on serialized attributes: they ride in a session or a request body. */
4
4
  const MAX_ATTRIBUTES_BYTES = 2048;
5
5
  function attributesSize(attributes) {
@@ -21,7 +21,6 @@ function bodyAttributes(body) {
21
21
  if (!parsed.success) return null;
22
22
  return parsed.data ?? {};
23
23
  }
24
- //#endregion
25
24
  export { MAX_ATTRIBUTES_BYTES, attributesSchema, attributesSize, bodyAttributes };
26
25
 
27
26
  //# sourceMappingURL=attributes.mjs.map
@@ -9,7 +9,7 @@ const require_utils_timing = require("../utils/timing.cjs");
9
9
  const require_utils_valid = require("../utils/valid.cjs");
10
10
  let node_crypto = require("node:crypto");
11
11
  let _shware_utils = require("@shware/utils");
12
- //#region src/auth/index.ts
12
+ // src/auth/index.ts
13
13
  const PKCE_FORMAT = /^[A-Za-z0-9_-]{43,128}$/;
14
14
  const CODE_VERIFIER_FORMAT = /^[A-Za-z0-9._~-]{43,128}$/;
15
15
  const INVALID_CODE_VERIFIER = {
@@ -697,7 +697,6 @@ var Auth = class {
697
697
  return Response.json({});
698
698
  };
699
699
  };
700
- //#endregion
701
700
  exports.Auth = Auth;
702
701
  exports.PATH = PATH;
703
702
 
@@ -1,7 +1,6 @@
1
1
  import { Principal } from "../core/index.cjs";
2
2
  import { Session } from "../session/types.cjs";
3
3
  import { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler, OAuth2AuthorizationOptions } from "./types.cjs";
4
- //#region src/auth/index.d.ts
5
4
  export declare const PATH: {
6
5
  readonly CSRF: '/csrf';
7
6
  readonly LOGOUT: '/logout';
@@ -124,5 +123,4 @@ export declare class Auth implements AuthService {
124
123
  listSessions: (principal: Principal) => Promise<Session[]>;
125
124
  cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
126
125
  }
127
- //#endregion
128
126
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;qBA4Ga;WACX;WACA;WACA;WAEA;WACA;WACA;WACA;WACA;WACA;WAEA;WACA;WACA;WACA;WASA;WACA;WAEA;;qBAMW,gBAAgB;mBACV;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;mBACA;EAEjB,cACE,mBACA,cACA,oBACA,kBACA,QACA,QACA,SACA,UACC;UA2BK;EAYR,OAAI,UAAoB,YAAU,QAAQ;EAmB1C,SAAM,SAAmB,YAAU,QAAQ;EAU3C,SAAM,SAAmB,SAAO,WAAa,kBAAgB,QAAQ;UAsB7D;UAUA;UAIA;UAIA;UAIA;UAIA;UAIA;UAIA;EAIR,cAAW,SAAmB,YAAU,QAAQ;EAOhD,cAAW,SAAmB,YAAU,QAAQ;EAOhD,sBAAmB,SACR,SAAO,UACN,+BACT,QAAQ;mBAmCM;EAUjB,kBAAe,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;;;;;;UA+HxE;EAYR,oBAAiB,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAmDlF,oBAAiB,SACN,SAAO,SACP,mBAAiB,sBAEzB,QAAQ;EA6E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B,QAAQ;;;;;;UA+HxE;EAYR,oBAAiB,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;EAmDlF,oBAAiB,SACN,SAAO,SACP,mBAAiB,sBAEzB,QAAQ;EA6EX,4BAAyB,SACd,SAAO,SACP;IAAQ;IAAe;QAA+B,kBAC9D,QAAQ;EA0CX,aAAU,SAAmB,SAAO,SAAW,sBAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;EAsE3E,mBAAgB,SAAmB,YAAU,QAAQ;;;;;;;;;;;;;;;;;;;EA0DrD,kBAAe,SAAmB,YAAU,QAAQ;EAgEpD,4BAAyB,UACb,SAAO,UACP;IAAQ;IAAe;QAA+B,kBAC/D,QAAQ;EAIX,aAAU,UAAoB,SAAO,UAAY,sBAAoB,QAAQ;EAI7E,OAAI,WAAqB,cAAY;;;;;;;;UAcvB;EAOd,kBAAe,SAAmB,YAAU;EAW5C,aAAoB,mBAAiB,SAC1B,SAAO,QACR,MACP,QAAQ,iBAAiB,UAAU;EAwBtC,gBAAa,sBAA8B;EAI3C,eAAY,SAAmB,YAAU,QAAQ;EAWjD,eAAY,WAAqB,cAAY,QAAQ;EAKrD,yBAAsB,0BAAkC,QAAQ"}
@@ -1,7 +1,6 @@
1
1
  import { Principal } from "../core/index.mjs";
2
2
  import { Session } from "../session/types.mjs";
3
3
  import { AuthConfig, AuthService, AuthorizedHandler, LoggedHandler, OAuth2AuthorizationOptions } from "./types.mjs";
4
- //#region src/auth/index.d.ts
5
4
  export declare const PATH: {
6
5
  readonly CSRF: '/csrf';
7
6
  readonly LOGOUT: '/logout';
@@ -124,5 +123,4 @@ export declare class Auth implements AuthService {
124
123
  listSessions: (principal: Principal) => Promise<Session[]>;
125
124
  cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
126
125
  }
127
- //#endregion
128
126
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/auth/index.ts"],"mappings":";;;;qBA4Ga;W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AAU;EAW5C,aAAoB,mBAAiB,SAC1B,SAAO,QACR,MACP,QAAQ,iBAAiB,UAAU;EAwBtC,gBAAa,sBAA8B;EAI3C,eAAY,SAAmB,YAAU,QAAQ;EAWjD,eAAY,WAAqB,cAAY,QAAQ;EAKrD,yBAAsB,0BAAkC,QAAQ"}
@@ -8,7 +8,7 @@ import { timing } from "../utils/timing.mjs";
8
8
  import { invalidArgument, resourceExhausted, valid, verifyTurnstileToken } from "../utils/valid.mjs";
9
9
  import { createHash, randomInt, randomUUID, timingSafeEqual } from "node:crypto";
10
10
  import { invariant } from "@shware/utils";
11
- //#region src/auth/index.ts
11
+ // src/auth/index.ts
12
12
  const PKCE_FORMAT = /^[A-Za-z0-9_-]{43,128}$/;
13
13
  const CODE_VERIFIER_FORMAT = /^[A-Za-z0-9._~-]{43,128}$/;
14
14
  const INVALID_CODE_VERIFIER = {
@@ -696,7 +696,6 @@ var Auth = class {
696
696
  return Response.json({});
697
697
  };
698
698
  };
699
- //#endregion
700
699
  export { Auth, PATH };
701
700
 
702
701
  //# sourceMappingURL=index.mjs.map
@@ -2,7 +2,6 @@ import { Principal } from "../core/index.cjs";
2
2
  import { KVRepository, Session, SessionRepository } from "../session/types.cjs";
3
3
  import { OAuth2ClientConfig, OAuth2Token, UserInfo } from "../oauth2/types.cjs";
4
4
  import { CookieOptions } from "../utils/http.cjs";
5
- //#region src/auth/types.d.ts
6
5
  export type LoggedHandler = (principal: Principal) => Promise<void>;
7
6
  /**
8
7
  * Who signed in, and how: what every login method hands to `onAuthorized`.
@@ -115,5 +114,4 @@ export interface AuthService {
115
114
  listSessions: (principal: Principal) => Promise<Session[]>;
116
115
  cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
117
116
  }
118
- //#endregion
119
117
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;YAKY,iBAAiB,WAAW,cAAc;;;;;;;;;;;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A;EACA,UAAU;EACV,QAAQ;EACR,YAAY;;;YAIF,qBACV,SAAS,SACT,eAAe,kBACZ,QAAQ;iBAEI;;;;;;;;;;;EAWf,aAAa;;iBAGE;EACf;EACA,cAAc;EACd,mBAAmB;EACnB,SAAS;IAAkB;;EAC3B;;;;;;;;;IASE;;EAEF;;EAEA;;;;;IAKE;;;;;IAKA;;EAEF;IACE,SAAS;;IAET;;;;;;;;MAQE;;;;iBAKW;EAEf,OAAO,SAAS,YAAY,QAAQ;EACpC,SAAS,SAAS,YAAY,QAAQ;EACtC,SAAS,SAAS,SAAS,WAAW,kBAAkB,QAAQ;EAGhE,cAAc,SAAS,YAAY,QAAQ;EAC3C,cAAc,SAAS,YAAY,QAAQ;EAC3C,sBACE,SAAS,SACT,UAAU,+BACP,QAAQ;EACb,kBAAkB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAChF,oBAAoB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAClF,oBACE,SAAS,SACT,cAAc,mBACd,sBACG,QAAQ;EAGb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EACb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EAEb,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAC3E,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAG3E,OAAO,WAAW,cAAc;EAChC,kBAAkB,SAAS,YAAY;EACvC,aAAa,mBACX,SAAS,SACT,QAAQ,MACL,QAAQ,iBAAiB,UAAU;EACxC,gBAAgB,sBAAsB;EACtC,eAAe,SAAS,YAAY,QAAQ;EAC5C,eAAe,WAAW,cAAc,QAAQ;EAChD,yBAAyB,0BAA0B,QAAQ"}
@@ -2,7 +2,6 @@ import { Principal } from "../core/index.mjs";
2
2
  import { KVRepository, Session, SessionRepository } from "../session/types.mjs";
3
3
  import { OAuth2ClientConfig, OAuth2Token, UserInfo } from "../oauth2/types.mjs";
4
4
  import { CookieOptions } from "../utils/http.mjs";
5
- //#region src/auth/types.d.ts
6
5
  export type LoggedHandler = (principal: Principal) => Promise<void>;
7
6
  /**
8
7
  * Who signed in, and how: what every login method hands to `onAuthorized`.
@@ -115,5 +114,4 @@ export interface AuthService {
115
114
  listSessions: (principal: Principal) => Promise<Session[]>;
116
115
  cleanupExpiredSessions: (cleanupCount?: number) => Promise<Response>;
117
116
  }
118
- //#endregion
119
117
  //# sourceMappingURL=types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","names":[],"sources":["../../src/auth/types.ts"],"mappings":";;;;;YAKY,iBAAiB,WAAW,cAAc;;;;;;;;;;;;;;;iBAerC;EACf;EACA;EACA,UAAU;EACV,QAAQ;EACR,YAAY;;;YAIF,qBACV,SAAS,SACT,eAAe,kBACZ,QAAQ;iBAEI;;;;;;;;;;;EAWf,aAAa;;iBAGE;EACf;EACA,cAAc;EACd,mBAAmB;EACnB,SAAS;IAAkB;;EAC3B;;;;;;;;;IASE;;EAEF;;EAEA;;;;;IAKE;;;;;IAKA;;EAEF;IACE,SAAS;;IAET;;;;;;;;MAQE;;;;iBAKW;EAEf,OAAO,SAAS,YAAY,QAAQ;EACpC,SAAS,SAAS,YAAY,QAAQ;EACtC,SAAS,SAAS,SAAS,WAAW,kBAAkB,QAAQ;EAGhE,cAAc,SAAS,YAAY,QAAQ;EAC3C,cAAc,SAAS,YAAY,QAAQ;EAC3C,sBACE,SAAS,SACT,UAAU,+BACP,QAAQ;EACb,kBAAkB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAChF,oBAAoB,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAClF,oBACE,SAAS,SACT,cAAc,mBACd,sBACG,QAAQ;EAGb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EACb,4BACE,SAAS,SACT,SAAS;IAAQ;IAAe;QAA+B,kBAC5D,QAAQ;EAEb,aAAa,SAAS,SAAS,cAA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AC3E,aAAa,SAAS,SAAS,cAAc,sBAAsB,QAAQ;EAG3E,OAAO,WAAW,cAAc;EAChC,kBAAkB,SAAS,YAAY;EACvC,aAAa,mBACX,SAAS,SACT,QAAQ,MACL,QAAQ,iBAAiB,UAAU;EACxC,gBAAgB,sBAAsB;EACtC,eAAe,SAAS,YAAY,QAAQ;EAC5C,eAAe,WAAW,cAAc,QAAQ;EAChD,yBAAyB,0BAA0B,QAAQ"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/core/index.ts
2
+ // src/core/index.ts
3
3
  const PROVIDERS = [
4
4
  "APPLE",
5
5
  "DISCORD",
@@ -14,7 +14,6 @@ const PROVIDERS = [
14
14
  "EMAIL",
15
15
  "PHONE"
16
16
  ];
17
- //#endregion
18
17
  exports.PROVIDERS = PROVIDERS;
19
18
 
20
19
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,3 @@
1
- //#region src/core/index.d.ts
2
1
  export type JSONValue = null | string | number | boolean | {
3
2
  [value: string]: JSONValue;
4
3
  } | Array<JSONValue>;
@@ -16,5 +15,4 @@ export interface CsrfToken {
16
15
  }
17
16
  export declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
18
17
  export type Provider = (typeof PROVIDERS)[number];
19
- //#endregion
20
18
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/core/index.ts"],"mappings":";YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../../src/core/index.ts"],"mappings":"A,YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
@@ -1,4 +1,3 @@
1
- //#region src/core/index.d.ts
2
1
  export type JSONValue = null | string | number | boolean | {
3
2
  [value: string]: JSONValue;
4
3
  } | Array<JSONValue>;
@@ -16,5 +15,4 @@ export interface CsrfToken {
16
15
  }
17
16
  export declare const PROVIDERS: readonly ['APPLE', 'DISCORD', 'FACEBOOK', 'GITHUB', 'GOOGLE', 'LINKEDIN', 'MICROSOFT', 'SLACK', 'WECHAT', 'X', 'EMAIL', 'PHONE'];
18
17
  export type Provider = (typeof PROVIDERS)[number];
19
- //#endregion
20
18
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/index.ts"],"mappings":";YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/core/index.ts"],"mappings":"A,YAAY;GAKL,gBAAgB;IACnB,MAAM;iBAEO;EACf;;iBAGe,uBAAuB;EACtC;EACA;;iBAGe;EACf;EACA;EACA;;qBAGW;YAiBD,mBAAmB"}
@@ -1,4 +1,4 @@
1
- //#region src/core/index.ts
1
+ // src/core/index.ts
2
2
  const PROVIDERS = [
3
3
  "APPLE",
4
4
  "DISCORD",
@@ -13,7 +13,6 @@ const PROVIDERS = [
13
13
  "EMAIL",
14
14
  "PHONE"
15
15
  ];
16
- //#endregion
17
16
  export { PROVIDERS };
18
17
 
19
18
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_auth_attributes = require("../auth/attributes.cjs");
3
3
  let zod_mini = require("zod/mini");
4
- //#region src/email/schema.ts
4
+ // src/email/schema.ts
5
5
  /**
6
6
  * An email address as an identity key: trimmed and lowercased before the format check, so
7
7
  * `" A@X.com "` is accepted as `"a@x.com"`. The whole address is lowercased, local part included:
@@ -18,7 +18,6 @@ const loginEmailSchema = (0, zod_mini.object)({
18
18
  verificationCode: (0, zod_mini.string)().check((0, zod_mini.regex)(/^\d{6}$/)),
19
19
  attributes: require_auth_attributes.attributesSchema
20
20
  });
21
- //#endregion
22
21
  exports.loginEmailSchema = loginEmailSchema;
23
22
  exports.sendEmailVerificationCodeSchema = sendEmailVerificationCodeSchema;
24
23
 
@@ -1,4 +1,3 @@
1
- //#region src/email/schema.d.ts
2
1
  export declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
3
2
  email: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniEmail>;
4
3
  turnstileToken: import("zod/mini").ZodMiniString<string>;
@@ -8,5 +7,4 @@ export declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
8
7
  verificationCode: import("zod/mini").ZodMiniString<string>;
9
8
  attributes: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniRecord<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniString<string>>>;
10
9
  }, import("zod/v4/core").$strip>;
11
- //#endregion
12
10
  //# sourceMappingURL=schema.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";qBAWa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;;yBAI3B"}
1
+ {"version":3,"file":"schema.d.cts","names":[],"sources":["../../src/email/schema.ts"],"mappings":"A,qBAWa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;;yBAI3B"}
@@ -1,4 +1,3 @@
1
- //#region src/email/schema.d.ts
2
1
  export declare const sendEmailVerificationCodeSchema: import("zod/mini").ZodMiniObject<{
3
2
  email: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniEmail>;
4
3
  turnstileToken: import("zod/mini").ZodMiniString<string>;
@@ -8,5 +7,4 @@ export declare const loginEmailSchema: import("zod/mini").ZodMiniObject<{
8
7
  verificationCode: import("zod/mini").ZodMiniString<string>;
9
8
  attributes: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniRecord<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniString<string>>>;
10
9
  }, import("zod/v4/core").$strip>;
11
- //#endregion
12
10
  //# sourceMappingURL=schema.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/email/schema.ts"],"mappings":";qBAWa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;;yBAI3B"}
1
+ {"version":3,"file":"schema.d.mts","names":[],"sources":["../../src/email/schema.ts"],"mappings":"A,qBAWa,oDAA+B;;;yBAG1C;qBAEW,qCAAgB;;;;yBAI3B"}
@@ -1,6 +1,6 @@
1
1
  import { attributesSchema } from "../auth/attributes.mjs";
2
2
  import { email, maxLength, object, pipe, regex, string, toLowerCase, trim } from "zod/mini";
3
- //#region src/email/schema.ts
3
+ // src/email/schema.ts
4
4
  /**
5
5
  * An email address as an identity key: trimmed and lowercased before the format check, so
6
6
  * `" A@X.com "` is accepted as `"a@x.com"`. The whole address is lowercased, local part included:
@@ -17,7 +17,6 @@ const loginEmailSchema = object({
17
17
  verificationCode: string().check(regex(/^\d{6}$/)),
18
18
  attributes: attributesSchema
19
19
  });
20
- //#endregion
21
20
  export { loginEmailSchema, sendEmailVerificationCodeSchema };
22
21
 
23
22
  //# sourceMappingURL=schema.mjs.map
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_oauth2_error = require("./error.cjs");
3
3
  let _shware_utils = require("@shware/utils");
4
4
  let zod_v4_mini = require("zod/v4-mini");
5
- //#region src/oauth2/client.ts
5
+ // src/oauth2/client.ts
6
6
  const oauth2RedirectQuerySchema = (0, zod_v4_mini.object)({
7
7
  code: (0, zod_v4_mini.optional)((0, zod_v4_mini.string)()),
8
8
  state: (0, zod_v4_mini.optional)((0, zod_v4_mini.string)()),
@@ -174,7 +174,6 @@ var OAuth2Client = class {
174
174
  function isOneTapProvider(provider) {
175
175
  return typeof provider.getTokenInfo === "function";
176
176
  }
177
- //#endregion
178
177
  exports.OAuth2Client = OAuth2Client;
179
178
  exports.googleOneTapSchema = googleOneTapSchema;
180
179
  exports.oauth2RedirectQuerySchema = oauth2RedirectQuerySchema;
@@ -1,5 +1,4 @@
1
1
  import { AuthorizationResponse, NativeCredential, OAuth2ClientConfig, OAuth2Token, OidcToken, PkceParameters, UserInfo } from "./types.cjs";
2
- //#region src/oauth2/client.d.ts
3
2
  export declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
4
3
  code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
5
4
  state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
@@ -97,5 +96,4 @@ export declare class OAuth2Client {
97
96
  clientId: string;
98
97
  }>;
99
98
  }
100
- //#endregion
101
99
  //# sourceMappingURL=client.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.cts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";;qBAkBa,8CAAyB;;;;;;;yBAQpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;;UAKU;UAUN;;UAKM;;;;;;UAaA;;;;;;UAcA;UAYA;EAIR,yBACJ,UACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;;EAYN,4BACJ,UACA,MACA;IAEA;IACA;IACA,OAAO;MACL;IAAU;IAAkB,OAAO;;;EAcjC,cACJ,UACA,UACA,OACA;IAEA;IACA;IACA,OAAO,cAAc;IACrB,WAAW;MACZ,QADYA;;EAOP,eAAe,UAAU;IAAgB;IAAkB;MAAoB;;;;;EAS/E,qBACJ,UACA,UACA;IAEA;IACA;IACA;MACE,QAAQ;EAON,cACJ,UACA,UACA;IAEA;IACA;IACA;MACD;;;;;EAWK,oBACJ,UACA,eAAe,kBAAkB,eACjC;IAEA;IACA,aAAa;IACb,OAAO,KAAK;MACb"}
1
+ {"version":3,"file":"client.d.cts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";qBAkBa,8CAAyB;;;;;;;yBAQpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;;UAKU;UAUN;;UAKM;;;;;;UAaA;;;;;;UAcA;UAYA;EAIR,yBACJ,UACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;;EAYN,4BACJ,UACA,MACA;IAEA;IACA;IACA,OAAO;MACL;IAAU;IAAkB,OAAO;;;EAcjC,cACJ,UACA,UACA,OACA;IAEA;IACA;IACA,OAAO,cAAc;IACrB,WAAW;MACZ,QADYA;;EAOP,eAAe,UAAU;IAAgB;IAAkB;MAAoB;;;;;EAS/E,qBACJ,UACA,UACA;IAEA;IACA;IACA;MACE,QAAQ;EAON,cACJ,UACA,UACA;IAEA;IACA;IACA;MACD;;;;;EAWK,oBACJ,UACA,eAAe,kBAAkB,eACjC;IAEA;IACA,aAAa;IACb,OAAO,KAAK;MACb"}
@@ -1,5 +1,4 @@
1
1
  import { AuthorizationResponse, NativeCredential, OAuth2ClientConfig, OAuth2Token, OidcToken, PkceParameters, UserInfo } from "./types.mjs";
2
- //#region src/oauth2/client.d.ts
3
2
  export declare const oauth2RedirectQuerySchema: import("zod/mini").ZodMiniObject<{
4
3
  code: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
5
4
  state: import("zod/mini").ZodMiniOptional<import("zod/mini").ZodMiniString<string>>;
@@ -97,5 +96,4 @@ export declare class OAuth2Client {
97
96
  clientId: string;
98
97
  }>;
99
98
  }
100
- //#endregion
101
99
  //# sourceMappingURL=client.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.mts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";;qBAkBa,8CAAyB;;;;;;;yBAQpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;;UAKU;UAUN;;UAKM;;;;;;UAaA;;;;;;UAcA;UAYA;EAIR,yBACJ,UACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;;EAYN,4BACJ,UACA,MACA;IAEA;IACA;IACA,OAAO;MACL;IAAU;IAAkB,OAAO;;;EAcjC,cACJ,UACA,UACA,OACA;IAEA;IACA;IACA,OAAO,cAAc;IACrB,WAAW;MACZ,QADYA;;EAOP,eAAe,UAAU;IAAgB;IAAkB;MAAoB;;;;;EAS/E,qBACJ,UACA,UACA;IAEA;IACA;IACA;MACE,QAAQ;EAON,cACJ,UACA,UACA;IAEA;IACA;IACA;MACD;;;;;EAWK,oBACJ,UACA,eAAe,kBAAkB,eACjC;IAEA;IACA,aAAa;IACb,OAAO,KAAK;MACb"}
1
+ {"version":3,"file":"client.d.mts","names":["_$__types0.UserInfo"],"sources":["../../src/oauth2/client.ts"],"mappings":";qBAkBa,8CAAyB;;;;;;;yBAQpC;qBAEW,uCAAkB;;;;;;;;;;yBAY7B;qBAEW;mBACM;EACjB,YAAY,QAAQ;MAIhB;MAIA;MAIA;;UAKU;UAUN;;UAKM;;;;;;UAaA;;;;;;UAcA;UAYA;EAIR,yBACJ,UACA,OACA;IAEA;IACA;IACA,OAAO;MACL,QAAQ;;EAYN,4BACJ,UACA,MACA;IAEA;IACA;IACA,OAAO;MACL;IAAU;IAAkB,OAAO;;;EAcjC,cACJ,UACA,UACA,OACA;IAEA;IACA;IACA,OAAO,cAAc;IACrB,WAAW;MACZ,QADYA;;EAOP,eAAe,UAAU;IAAgB;IAAkB;MAAoB;;;;;EAS/E,qBACJ,UACA,UACA;IAEA;IACA;IACA;MACE,QAAQ;EAON,cACJ,UACA,UACA;IAEA;IACA;IACA;MACD;;;;;EAWK,oBACJ,UACA,eAAe,kBAAkB,eACjC;IAEA;IACA,aAAa;IACb,OAAO,KAAK;MACb"}
@@ -1,7 +1,7 @@
1
1
  import { OAuth2Error } from "./error.mjs";
2
2
  import { invariant } from "@shware/utils";
3
3
  import { object, optional, string } from "zod/v4-mini";
4
- //#region src/oauth2/client.ts
4
+ // src/oauth2/client.ts
5
5
  const oauth2RedirectQuerySchema = object({
6
6
  code: optional(string()),
7
7
  state: optional(string()),
@@ -173,7 +173,6 @@ var OAuth2Client = class {
173
173
  function isOneTapProvider(provider) {
174
174
  return typeof provider.getTokenInfo === "function";
175
175
  }
176
- //#endregion
177
176
  export { OAuth2Client, googleOneTapSchema, oauth2RedirectQuerySchema };
178
177
 
179
178
  //# sourceMappingURL=client.mjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/oauth2/error.ts
2
+ // src/oauth2/error.ts
3
3
  /** The registered error codes of `OAuth2ErrorType`, for checking untrusted input at runtime. */
4
4
  const OAUTH2_ERROR_TYPES = /* @__PURE__ */ new Set([
5
5
  "invalid_request",
@@ -35,7 +35,6 @@ var AuthenticationError = class AuthenticationError extends Error {
35
35
  Object.setPrototypeOf(this, AuthenticationError.prototype);
36
36
  }
37
37
  };
38
- //#endregion
39
38
  exports.AuthenticationError = AuthenticationError;
40
39
  exports.OAuth2Error = OAuth2Error;
41
40
  exports.isKnownOAuth2ErrorType = isKnownOAuth2ErrorType;
@@ -1,4 +1,3 @@
1
- //#region src/oauth2/error.d.ts
2
1
  export type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
3
2
  export declare function isKnownOAuth2ErrorType(value: string): boolean;
4
3
  export declare class OAuth2Error extends Error {
@@ -9,5 +8,4 @@ export declare class OAuth2Error extends Error {
9
8
  export declare class AuthenticationError extends Error {
10
9
  constructor(message: string);
11
10
  }
12
- //#endregion
13
11
  //# sourceMappingURL=error.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.cts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";YACY;wBAiCI,uBAAuB;qBAI1B,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
1
+ {"version":3,"file":"error.d.cts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":"A,YACY;wBAiCI,uBAAuB;qBAI1B,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
@@ -1,4 +1,3 @@
1
- //#region src/oauth2/error.d.ts
2
1
  export type OAuth2ErrorType = 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'unsupported_response_type' | 'insufficient_scope' | 'redirect_uri_mismatch' | 'access_denied' | 'server_error' | 'temporarily_unavailable' | (string & {});
3
2
  export declare function isKnownOAuth2ErrorType(value: string): boolean;
4
3
  export declare class OAuth2Error extends Error {
@@ -9,5 +8,4 @@ export declare class OAuth2Error extends Error {
9
8
  export declare class AuthenticationError extends Error {
10
9
  constructor(message: string);
11
10
  }
12
- //#endregion
13
11
  //# sourceMappingURL=error.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.mts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":";YACY;wBAiCI,uBAAuB;qBAI1B,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
1
+ {"version":3,"file":"error.d.mts","names":[],"sources":["../../src/oauth2/error.ts"],"mappings":"A,YACY;wBAiCI,uBAAuB;qBAI1B,oBAAoB;WACtB;WACA,OAAO;EAEhB,YAAY,gBAAgB,OAAO,iBAAiB;;qBAQzC,4BAA4B;EACvC,YAAY"}
@@ -1,4 +1,4 @@
1
- //#region src/oauth2/error.ts
1
+ // src/oauth2/error.ts
2
2
  /** The registered error codes of `OAuth2ErrorType`, for checking untrusted input at runtime. */
3
3
  const OAUTH2_ERROR_TYPES = /* @__PURE__ */ new Set([
4
4
  "invalid_request",
@@ -34,7 +34,6 @@ var AuthenticationError = class AuthenticationError extends Error {
34
34
  Object.setPrototypeOf(this, AuthenticationError.prototype);
35
35
  }
36
36
  };
37
- //#endregion
38
37
  export { AuthenticationError, OAuth2Error, isKnownOAuth2ErrorType };
39
38
 
40
39
  //# sourceMappingURL=error.mjs.map
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/oauth2/name.ts
2
+ // src/oauth2/name.ts
3
3
  /**
4
4
  * Upper bound, in characters, on each name part taken from the client. Names that reach us outside
5
5
  * a signed token (Apple's form_post `user`, a native login body) are plain client input, so they
@@ -96,7 +96,6 @@ function isObject(value) {
96
96
  function withoutUndefined(value) {
97
97
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0));
98
98
  }
99
- //#endregion
100
99
  exports.MAX_NAME_PART_LENGTH = MAX_NAME_PART_LENGTH;
101
100
  exports.cleanNamePart = cleanNamePart;
102
101
  exports.cleanPersonName = cleanPersonName;
@@ -1,5 +1,4 @@
1
1
  import { PersonNameComponents, StandardClaims } from "./types.cjs";
2
- //#region src/oauth2/name.d.ts
3
2
  /**
4
3
  * Upper bound, in characters, on each name part taken from the client. Names that reach us outside
5
4
  * a signed token (Apple's form_post `user`, a native login body) are plain client input, so they
@@ -44,6 +43,5 @@ type NameClaims = Pick<StandardClaims, 'name' | 'given_name' | 'family_name' | '
44
43
  * Undefined parts are left out, so spreading the result never overwrites a claim with `undefined`.
45
44
  */
46
45
  export declare function nameClaims(parts: Omit<NameClaims, 'name'>): NameClaims;
47
- //#endregion
48
46
  export {};
49
47
  //# sourceMappingURL=name.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"name.d.cts","names":[],"sources":["../../src/oauth2/name.ts"],"mappings":";;;;;;;qBAOa;;;;;;;wBAaG,cACd,YACA,eACC,KAAK;;;;;;wBAcQ,cAAc;;iBAQb;EACf;IAAS;IAAoB;;EAC7B;;;;;;;wBAQc,eAAe,0BAA0B;;;;;wBAkCzC,gBAAgB,iBAAiB;KAU5C,aAAa,KAChB;;;;;wBAQc,WAAW,OAAO,KAAK,sBAAsB"}
1
+ {"version":3,"file":"name.d.cts","names":[],"sources":["../../src/oauth2/name.ts"],"mappings":";;;;;;qBAOa;;;;;;;wBAaG,cACd,YACA,eACC,KAAK;;;;;;wBAcQ,cAAc;;iBAQb;EACf;IAAS;IAAoB;;EAC7B;;;;;;;wBAQc,eAAe,0BAA0B;;;;;wBAkCzC,gBAAgB,iBAAiB;KAU5C,aAAa,KAChB;;;;;wBAQc,WAAW,OAAO,KAAK,sBAAsB"}
@@ -1,5 +1,4 @@
1
1
  import { PersonNameComponents, StandardClaims } from "./types.mjs";
2
- //#region src/oauth2/name.d.ts
3
2
  /**
4
3
  * Upper bound, in characters, on each name part taken from the client. Names that reach us outside
5
4
  * a signed token (Apple's form_post `user`, a native login body) are plain client input, so they
@@ -44,6 +43,5 @@ type NameClaims = Pick<StandardClaims, 'name' | 'given_name' | 'family_name' | '
44
43
  * Undefined parts are left out, so spreading the result never overwrites a claim with `undefined`.
45
44
  */
46
45
  export declare function nameClaims(parts: Omit<NameClaims, 'name'>): NameClaims;
47
- //#endregion
48
46
  export {};
49
47
  //# sourceMappingURL=name.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"name.d.mts","names":[],"sources":["../../src/oauth2/name.ts"],"mappings":";;;;;;;qBAOa;;;;;;;wBAaG,cACd,YACA,eACC,KAAK;;;;;;wBAcQ,cAAc;;iBAQb;EACf;IAAS;IAAoB;;EAC7B;;;;;;;wBAQc,eAAe,0BAA0B;;;;;wBAkCzC,gBAAgB,iBAAiB;KAU5C,aAAa,KAChB;;;;;wBAQc,WAAW,OAAO,KAAK,sBAAsB"}
1
+ {"version":3,"file":"name.d.mts","names":[],"sources":["../../src/oauth2/name.ts"],"mappings":";;;;;;qBAOa;;;;;;;wBAaG,cACd,YACA,eACC,KAAK;;;;;;wBAcQ,cAAc;;iBAQb;EACf;IAAS;IAAoB;;EAC7B;;;;;;;wBAQc,eAAe,0BAA0B;;;;;wBAkCzC,gBAAgB,iBAAiB;KAU5C,aAAa,KAChB;;;;;wBAQc,WAAW,OAAO,KAAK,sBAAsB"}
@@ -1,4 +1,4 @@
1
- //#region src/oauth2/name.ts
1
+ // src/oauth2/name.ts
2
2
  /**
3
3
  * Upper bound, in characters, on each name part taken from the client. Names that reach us outside
4
4
  * a signed token (Apple's form_post `user`, a native login body) are plain client input, so they
@@ -95,7 +95,6 @@ function isObject(value) {
95
95
  function withoutUndefined(value) {
96
96
  return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== void 0));
97
97
  }
98
- //#endregion
99
98
  export { MAX_NAME_PART_LENGTH, cleanNamePart, cleanPersonName, composeName, nameClaims, parseAppleUser };
100
99
 
101
100
  //# sourceMappingURL=name.mjs.map
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let jose = require("jose");
3
- //#region src/oauth2/provider/apple-client-secret.ts
3
+ // src/oauth2/provider/apple-client-secret.ts
4
4
  /**
5
5
  * Sign in with Apple has no static client secret: the secret is a JWT the server signs with its
6
6
  * Sign in with Apple key (ES256, `iss` = team, `sub` = client id, `aud` = appleid.apple.com), and
@@ -40,7 +40,6 @@ function createAppleClientSecret(options) {
40
40
  return secret;
41
41
  };
42
42
  }
43
- //#endregion
44
43
  exports.createAppleClientSecret = createAppleClientSecret;
45
44
 
46
45
  //# sourceMappingURL=apple-client-secret.cjs.map
@@ -1,4 +1,3 @@
1
- //#region src/oauth2/provider/apple-client-secret.d.ts
2
1
  export interface AppleClientSecretOptions {
3
2
  /** Apple Developer Team ID (Membership details). */
4
3
  teamId: string;
@@ -23,5 +22,4 @@ export interface AppleClientSecretOptions {
23
22
  * instead of generating, storing and rotating static ones by hand.
24
23
  */
25
24
  export declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
26
- //#endregion
27
25
  //# sourceMappingURL=apple-client-secret.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple-client-secret.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
1
+ {"version":3,"file":"apple-client-secret.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":"A,iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
@@ -1,4 +1,3 @@
1
- //#region src/oauth2/provider/apple-client-secret.d.ts
2
1
  export interface AppleClientSecretOptions {
3
2
  /** Apple Developer Team ID (Membership details). */
4
3
  teamId: string;
@@ -23,5 +22,4 @@ export interface AppleClientSecretOptions {
23
22
  * instead of generating, storing and rotating static ones by hand.
24
23
  */
25
24
  export declare function createAppleClientSecret(options: AppleClientSecretOptions): (clientId: string) => Promise<string>;
26
- //#endregion
27
25
  //# sourceMappingURL=apple-client-secret.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple-client-secret.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":";iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
1
+ {"version":3,"file":"apple-client-secret.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple-client-secret.ts"],"mappings":"A,iBAEiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;;;;;;;wBAcc,wBAAwB,SAAS,4BAAwB,qBAmBZ"}
@@ -1,5 +1,5 @@
1
1
  import { SignJWT, importPKCS8 } from "jose";
2
- //#region src/oauth2/provider/apple-client-secret.ts
2
+ // src/oauth2/provider/apple-client-secret.ts
3
3
  /**
4
4
  * Sign in with Apple has no static client secret: the secret is a JWT the server signs with its
5
5
  * Sign in with Apple key (ES256, `iss` = team, `sub` = client id, `aud` = appleid.apple.com), and
@@ -39,7 +39,6 @@ function createAppleClientSecret(options) {
39
39
  return secret;
40
40
  };
41
41
  }
42
- //#endregion
43
42
  export { createAppleClientSecret };
44
43
 
45
44
  //# sourceMappingURL=apple-client-secret.mjs.map