@shware/security 7.0.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 (155) 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 +20 -3
  8. package/dist/auth/index.cjs.map +1 -1
  9. package/dist/auth/index.d.cts +10 -3
  10. package/dist/auth/index.d.cts.map +1 -1
  11. package/dist/auth/index.d.mts +10 -3
  12. package/dist/auth/index.d.mts.map +1 -1
  13. package/dist/auth/index.mjs +20 -3
  14. package/dist/auth/index.mjs.map +1 -1
  15. package/dist/auth/types.d.cts +11 -2
  16. package/dist/auth/types.d.cts.map +1 -1
  17. package/dist/auth/types.d.mts +11 -2
  18. package/dist/auth/types.d.mts.map +1 -1
  19. package/dist/core/index.cjs +1 -2
  20. package/dist/core/index.d.cts +0 -2
  21. package/dist/core/index.d.cts.map +1 -1
  22. package/dist/core/index.d.mts +0 -2
  23. package/dist/core/index.d.mts.map +1 -1
  24. package/dist/core/index.mjs +1 -2
  25. package/dist/email/schema.cjs +1 -2
  26. package/dist/email/schema.d.cts +0 -2
  27. package/dist/email/schema.d.cts.map +1 -1
  28. package/dist/email/schema.d.mts +0 -2
  29. package/dist/email/schema.d.mts.map +1 -1
  30. package/dist/email/schema.mjs +1 -2
  31. package/dist/oauth2/client.cjs +1 -2
  32. package/dist/oauth2/client.d.cts +0 -2
  33. package/dist/oauth2/client.d.cts.map +1 -1
  34. package/dist/oauth2/client.d.mts +0 -2
  35. package/dist/oauth2/client.d.mts.map +1 -1
  36. package/dist/oauth2/client.mjs +1 -2
  37. package/dist/oauth2/error.cjs +1 -2
  38. package/dist/oauth2/error.d.cts +0 -2
  39. package/dist/oauth2/error.d.cts.map +1 -1
  40. package/dist/oauth2/error.d.mts +0 -2
  41. package/dist/oauth2/error.d.mts.map +1 -1
  42. package/dist/oauth2/error.mjs +1 -2
  43. package/dist/oauth2/name.cjs +1 -2
  44. package/dist/oauth2/name.d.cts +0 -2
  45. package/dist/oauth2/name.d.cts.map +1 -1
  46. package/dist/oauth2/name.d.mts +0 -2
  47. package/dist/oauth2/name.d.mts.map +1 -1
  48. package/dist/oauth2/name.mjs +1 -2
  49. package/dist/oauth2/provider/apple-client-secret.cjs +1 -2
  50. package/dist/oauth2/provider/apple-client-secret.d.cts +0 -2
  51. package/dist/oauth2/provider/apple-client-secret.d.cts.map +1 -1
  52. package/dist/oauth2/provider/apple-client-secret.d.mts +0 -2
  53. package/dist/oauth2/provider/apple-client-secret.d.mts.map +1 -1
  54. package/dist/oauth2/provider/apple-client-secret.mjs +1 -2
  55. package/dist/oauth2/provider/apple.cjs +1 -2
  56. package/dist/oauth2/provider/apple.d.cts +0 -2
  57. package/dist/oauth2/provider/apple.d.cts.map +1 -1
  58. package/dist/oauth2/provider/apple.d.mts +0 -2
  59. package/dist/oauth2/provider/apple.d.mts.map +1 -1
  60. package/dist/oauth2/provider/apple.mjs +1 -2
  61. package/dist/oauth2/provider/common.cjs +1 -2
  62. package/dist/oauth2/provider/common.d.cts +0 -2
  63. package/dist/oauth2/provider/common.d.cts.map +1 -1
  64. package/dist/oauth2/provider/common.d.mts +0 -2
  65. package/dist/oauth2/provider/common.d.mts.map +1 -1
  66. package/dist/oauth2/provider/common.mjs +1 -2
  67. package/dist/oauth2/provider/facebook.cjs +1 -2
  68. package/dist/oauth2/provider/facebook.d.cts +0 -2
  69. package/dist/oauth2/provider/facebook.d.cts.map +1 -1
  70. package/dist/oauth2/provider/facebook.d.mts +0 -2
  71. package/dist/oauth2/provider/facebook.d.mts.map +1 -1
  72. package/dist/oauth2/provider/facebook.mjs +1 -2
  73. package/dist/oauth2/provider/github.cjs +1 -2
  74. package/dist/oauth2/provider/github.d.cts +0 -2
  75. package/dist/oauth2/provider/github.d.cts.map +1 -1
  76. package/dist/oauth2/provider/github.d.mts +0 -2
  77. package/dist/oauth2/provider/github.d.mts.map +1 -1
  78. package/dist/oauth2/provider/github.mjs +1 -2
  79. package/dist/oauth2/provider/google.cjs +1 -2
  80. package/dist/oauth2/provider/google.d.cts +0 -2
  81. package/dist/oauth2/provider/google.d.cts.map +1 -1
  82. package/dist/oauth2/provider/google.d.mts +0 -2
  83. package/dist/oauth2/provider/google.d.mts.map +1 -1
  84. package/dist/oauth2/provider/google.mjs +1 -2
  85. package/dist/oauth2/provider/wechat.cjs +1 -2
  86. package/dist/oauth2/provider/wechat.d.cts +0 -2
  87. package/dist/oauth2/provider/wechat.d.cts.map +1 -1
  88. package/dist/oauth2/provider/wechat.d.mts +0 -2
  89. package/dist/oauth2/provider/wechat.d.mts.map +1 -1
  90. package/dist/oauth2/provider/wechat.mjs +1 -2
  91. package/dist/oauth2/provider/x.cjs +1 -2
  92. package/dist/oauth2/provider/x.d.cts +0 -2
  93. package/dist/oauth2/provider/x.d.cts.map +1 -1
  94. package/dist/oauth2/provider/x.d.mts +0 -2
  95. package/dist/oauth2/provider/x.d.mts.map +1 -1
  96. package/dist/oauth2/provider/x.mjs +1 -2
  97. package/dist/oauth2/types.cjs +1 -2
  98. package/dist/oauth2/types.d.cts +0 -2
  99. package/dist/oauth2/types.d.cts.map +1 -1
  100. package/dist/oauth2/types.d.mts +0 -2
  101. package/dist/oauth2/types.d.mts.map +1 -1
  102. package/dist/oauth2/types.mjs +1 -2
  103. package/dist/session/common.cjs +1 -2
  104. package/dist/session/common.d.cts +0 -2
  105. package/dist/session/common.d.cts.map +1 -1
  106. package/dist/session/common.d.mts +0 -2
  107. package/dist/session/common.d.mts.map +1 -1
  108. package/dist/session/common.mjs +1 -2
  109. package/dist/session/db.cjs +1 -2
  110. package/dist/session/db.d.cts +0 -2
  111. package/dist/session/db.d.cts.map +1 -1
  112. package/dist/session/db.d.mts +0 -2
  113. package/dist/session/db.d.mts.map +1 -1
  114. package/dist/session/db.mjs +1 -2
  115. package/dist/session/map-session.cjs +1 -2
  116. package/dist/session/map-session.d.cts +0 -2
  117. package/dist/session/map-session.d.cts.map +1 -1
  118. package/dist/session/map-session.d.mts +0 -2
  119. package/dist/session/map-session.d.mts.map +1 -1
  120. package/dist/session/map-session.mjs +1 -2
  121. package/dist/session/redis.cjs +1 -2
  122. package/dist/session/redis.d.cts +0 -2
  123. package/dist/session/redis.d.cts.map +1 -1
  124. package/dist/session/redis.d.mts +0 -2
  125. package/dist/session/redis.d.mts.map +1 -1
  126. package/dist/session/redis.mjs +1 -2
  127. package/dist/session/types.d.cts +0 -2
  128. package/dist/session/types.d.cts.map +1 -1
  129. package/dist/session/types.d.mts +0 -2
  130. package/dist/session/types.d.mts.map +1 -1
  131. package/dist/utils/http.cjs +1 -2
  132. package/dist/utils/http.d.cts +0 -2
  133. package/dist/utils/http.d.cts.map +1 -1
  134. package/dist/utils/http.d.mts +0 -2
  135. package/dist/utils/http.d.mts.map +1 -1
  136. package/dist/utils/http.mjs +1 -2
  137. package/dist/utils/oauth2.cjs +1 -2
  138. package/dist/utils/oauth2.d.cts +0 -2
  139. package/dist/utils/oauth2.d.cts.map +1 -1
  140. package/dist/utils/oauth2.d.mts +0 -2
  141. package/dist/utils/oauth2.d.mts.map +1 -1
  142. package/dist/utils/oauth2.mjs +1 -2
  143. package/dist/utils/timing.cjs +1 -2
  144. package/dist/utils/timing.d.cts +0 -2
  145. package/dist/utils/timing.d.cts.map +1 -1
  146. package/dist/utils/timing.d.mts +0 -2
  147. package/dist/utils/timing.d.mts.map +1 -1
  148. package/dist/utils/timing.mjs +1 -2
  149. package/dist/utils/valid.cjs +1 -2
  150. package/dist/utils/valid.d.cts +0 -2
  151. package/dist/utils/valid.d.cts.map +1 -1
  152. package/dist/utils/valid.d.mts +0 -2
  153. package/dist/utils/valid.d.mts.map +1 -1
  154. package/dist/utils/valid.mjs +1 -2
  155. package/package.json +3 -3
@@ -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
@@ -3,7 +3,7 @@ const require_oauth2_error = require("../error.cjs");
3
3
  const require_oauth2_name = require("../name.cjs");
4
4
  const require_oauth2_provider_common = require("./common.cjs");
5
5
  let _shware_utils = require("@shware/utils");
6
- //#region src/oauth2/provider/apple.ts
6
+ // src/oauth2/provider/apple.ts
7
7
  /** `iss` of every Apple id token (https://appleid.apple.com/.well-known/openid-configuration). */
8
8
  const APPLE_ISSUER = "https://appleid.apple.com";
9
9
  function createAppleProvider() {
@@ -99,7 +99,6 @@ function createAppleProvider() {
99
99
  };
100
100
  }
101
101
  const apple = createAppleProvider();
102
- //#endregion
103
102
  exports.apple = apple;
104
103
  exports.createAppleProvider = createAppleProvider;
105
104
 
@@ -1,6 +1,5 @@
1
1
  import { NativeCredential, OAuth2Token, PersonNameComponents, Provider } from "../types.cjs";
2
2
  import { AppleUser } from "../name.cjs";
3
- //#region src/oauth2/provider/apple.d.ts
4
3
  export declare function createAppleProvider(): Provider;
5
4
  export declare const apple: Provider;
6
5
  export interface AppleIdToken {
@@ -42,5 +41,4 @@ export interface AppleNativeCredential extends NativeCredential {
42
41
  export interface AppleErrorResponse {
43
42
  error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope';
44
43
  }
45
- //#endregion
46
44
  //# sourceMappingURL=apple.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;;wBAiBgB,uBAAuB;qBAgF1B,OAAK;iBAID;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;;;;;iBAOe,sBAAsB;;EAErC,OAAO;;EAEP,WAAW;;iBAKI,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;;iBAIe;EACf"}
1
+ {"version":3,"file":"apple.d.cts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;wBAiBgB,uBAAuB;qBAgF1B,OAAK;iBAID;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;;;;;iBAOe,sBAAsB;;EAErC,OAAO;;EAEP,WAAW;;iBAKI,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;;iBAIe;EACf"}
@@ -1,6 +1,5 @@
1
1
  import { NativeCredential, OAuth2Token, PersonNameComponents, Provider } from "../types.mjs";
2
2
  import { AppleUser } from "../name.mjs";
3
- //#region src/oauth2/provider/apple.d.ts
4
3
  export declare function createAppleProvider(): Provider;
5
4
  export declare const apple: Provider;
6
5
  export interface AppleIdToken {
@@ -42,5 +41,4 @@ export interface AppleNativeCredential extends NativeCredential {
42
41
  export interface AppleErrorResponse {
43
42
  error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'unauthorized_client' | 'unsupported_grant_type' | 'invalid_scope';
44
43
  }
45
- //#endregion
46
44
  //# sourceMappingURL=apple.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apple.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;;wBAiBgB,uBAAuB;qBAgF1B,OAAK;iBAID;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;;;;;iBAOe,sBAAsB;;EAErC,OAAO;;EAEP,WAAW;;iBAKI,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;;iBAIe;EACf"}
1
+ {"version":3,"file":"apple.d.mts","names":[],"sources":["../../../src/oauth2/provider/apple.ts"],"mappings":";;wBAiBgB,uBAAuB;qBAgF1B,OAAK;iBAID;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;;;;;iBAOe,sBAAsB;;EAErC,OAAO;;EAEP,WAAW;;iBAKI,mBAAmB;EAClC;EACA;EACA;EACA;EACA;;iBAGe,8BAA8B;EAC7C;EACA;EACA;;iBAIe;EACf"}
@@ -2,7 +2,7 @@ import { OAuth2Error } from "../error.mjs";
2
2
  import { cleanPersonName, nameClaims, parseAppleUser } from "../name.mjs";
3
3
  import { createAuthorizationUri, exchangeAuthorizationCode, verifyIdToken } from "./common.mjs";
4
4
  import { invariant } from "@shware/utils";
5
- //#region src/oauth2/provider/apple.ts
5
+ // src/oauth2/provider/apple.ts
6
6
  /** `iss` of every Apple id token (https://appleid.apple.com/.well-known/openid-configuration). */
7
7
  const APPLE_ISSUER = "https://appleid.apple.com";
8
8
  function createAppleProvider() {
@@ -98,7 +98,6 @@ function createAppleProvider() {
98
98
  };
99
99
  }
100
100
  const apple = createAppleProvider();
101
- //#endregion
102
101
  export { apple, createAppleProvider };
103
102
 
104
103
  //# sourceMappingURL=apple.mjs.map
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_oauth2_error = require("../error.cjs");
3
3
  let jose = require("jose");
4
- //#region src/oauth2/provider/common.ts
4
+ // src/oauth2/provider/common.ts
5
5
  function createAuthorizationUri(options) {
6
6
  const url = new URL(options.authorizationUri);
7
7
  url.searchParams.append("response_type", "code");
@@ -93,7 +93,6 @@ async function verifyIdToken(idToken, options) {
93
93
  throw new require_oauth2_error.OAuth2Error(400, "invalid_request", "Failed to verify id_token");
94
94
  }
95
95
  }
96
- //#endregion
97
96
  exports.createAuthorizationUri = createAuthorizationUri;
98
97
  exports.exchangeAuthorizationCode = exchangeAuthorizationCode;
99
98
  exports.refreshAccessToken = refreshAccessToken;
@@ -1,5 +1,4 @@
1
1
  import { ExchangeCodeParams, PkceParameters, RefreshTokenParams } from "../types.cjs";
2
- //#region src/oauth2/provider/common.d.ts
3
2
  export declare function createAuthorizationUri(options: {
4
3
  state: string;
5
4
  scope: string[];
@@ -38,6 +37,5 @@ export interface VerifyIdTokenOptions {
38
37
  audience: string;
39
38
  }
40
39
  export declare function verifyIdToken<T>(idToken: string, options: VerifyIdTokenOptions): Promise<T>;
41
- //#endregion
42
40
  export {};
43
41
  //# sourceMappingURL=common.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.cts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;;EAEA,UAAU;IACX,QAAA;wBAyBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;iBAwB1C;EACf;;EAEA;;;;;;EAMA;;wBAGoB,cAAc,GAAG,iBAAiB,SAAS,uBAAoB,QAAA"}
1
+ {"version":3,"file":"common.d.cts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;;EAEA,UAAU;IACX,QAAA;wBAyBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;iBAwB1C;EACf;;EAEA;;;;;;EAMA;;wBAGoB,cAAc,GAAG,iBAAiB,SAAS,uBAAoB,QAAA"}
@@ -1,5 +1,4 @@
1
1
  import { ExchangeCodeParams, PkceParameters, RefreshTokenParams } from "../types.mjs";
2
- //#region src/oauth2/provider/common.d.ts
3
2
  export declare function createAuthorizationUri(options: {
4
3
  state: string;
5
4
  scope: string[];
@@ -38,6 +37,5 @@ export interface VerifyIdTokenOptions {
38
37
  audience: string;
39
38
  }
40
39
  export declare function verifyIdToken<T>(idToken: string, options: VerifyIdTokenOptions): Promise<T>;
41
- //#endregion
42
40
  export {};
43
41
  //# sourceMappingURL=common.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.mts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";;wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;;EAEA,UAAU;IACX,QAAA;wBAyBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;iBAwB1C;EACf;;EAEA;;;;;;EAMA;;wBAGoB,cAAc,GAAG,iBAAiB,SAAS,uBAAoB,QAAA"}
1
+ {"version":3,"file":"common.d.mts","names":[],"sources":["../../../src/oauth2/provider/common.ts"],"mappings":";wBAIgB,uBAAuB;EACrC;EACA;EACA;EACA;EACA;EACA,OAAO,KAAK;IACb;wBAcqB,0BACpB,QAAQ;EACN;EACA;;EAEA,UAAU;IACX,QAAA;wBAyBmB,mBACpB,QAAQ;EACN;EACA;IACD,QAAA;UAsBO;EACR;EACA;EACA;EACA;EACA;;wBAGoB,YAAY,QAAQ,oBAAiB;iBAwB1C;EACf;;EAEA;;;;;;EAMA;;wBAGoB,cAAc,GAAG,iBAAiB,SAAS,uBAAoB,QAAA"}
@@ -1,6 +1,6 @@
1
1
  import { OAuth2Error } from "../error.mjs";
2
2
  import { createRemoteJWKSet, jwtVerify } from "jose";
3
- //#region src/oauth2/provider/common.ts
3
+ // src/oauth2/provider/common.ts
4
4
  function createAuthorizationUri(options) {
5
5
  const url = new URL(options.authorizationUri);
6
6
  url.searchParams.append("response_type", "code");
@@ -92,7 +92,6 @@ async function verifyIdToken(idToken, options) {
92
92
  throw new OAuth2Error(400, "invalid_request", "Failed to verify id_token");
93
93
  }
94
94
  }
95
- //#endregion
96
95
  export { createAuthorizationUri, exchangeAuthorizationCode, refreshAccessToken, revokeToken, verifyIdToken };
97
96
 
98
97
  //# sourceMappingURL=common.mjs.map
@@ -3,7 +3,7 @@ const require_oauth2_error = require("../error.cjs");
3
3
  const require_oauth2_provider_common = require("./common.cjs");
4
4
  let node_crypto = require("node:crypto");
5
5
  let _shware_utils = require("@shware/utils");
6
- //#region src/oauth2/provider/facebook.ts
6
+ // src/oauth2/provider/facebook.ts
7
7
  /**
8
8
  * `iss` of Limited Login id tokens, per https://limited.facebook.com/.well-known/openid-configuration/
9
9
  * (their `aud` is the app id).
@@ -113,7 +113,6 @@ async function fetchUserInfo(userInfoUri, accessToken, appSecretProof) {
113
113
  }
114
114
  };
115
115
  }
116
- //#endregion
117
116
  exports.createFacebookProvider = createFacebookProvider;
118
117
  exports.facebook = facebook;
119
118
 
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.cjs";
2
- //#region src/oauth2/provider/facebook.d.ts
3
2
  /**
4
3
  * ref: https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow/
5
4
  * ref: https://developers.facebook.com/tools/explorer
@@ -40,5 +39,4 @@ export type FacebookAppCredential = {
40
39
  state: string;
41
40
  access_token: string;
42
41
  };
43
- //#endregion
44
42
  //# sourceMappingURL=facebook.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facebook.d.cts","names":[],"sources":["../../../src/oauth2/provider/facebook.ts"],"mappings":";;;;;;wBAgBgB,0BAA0B;qBAgF7B,UAAQ;iBA8BJ;EACf;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;IACE;MACE;MACA;MACA;MACA;;;;iBAKW,sBAAsB;EACrC;EACA;EACA;EACA;;YAGU;EACN;EAAe;;EACf;EAAe"}
1
+ {"version":3,"file":"facebook.d.cts","names":[],"sources":["../../../src/oauth2/provider/facebook.ts"],"mappings":";;;;;wBAgBgB,0BAA0B;qBAgF7B,UAAQ;iBA8BJ;EACf;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;IACE;MACE;MACA;MACA;MACA;;;;iBAKW,sBAAsB;EACrC;EACA;EACA;EACA;;YAGU;EACN;EAAe;;EACf;EAAe"}
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.mjs";
2
- //#region src/oauth2/provider/facebook.d.ts
3
2
  /**
4
3
  * ref: https://developers.facebook.com/docs/facebook-login/guides/advanced/manual-flow/
5
4
  * ref: https://developers.facebook.com/tools/explorer
@@ -40,5 +39,4 @@ export type FacebookAppCredential = {
40
39
  state: string;
41
40
  access_token: string;
42
41
  };
43
- //#endregion
44
42
  //# sourceMappingURL=facebook.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"facebook.d.mts","names":[],"sources":["../../../src/oauth2/provider/facebook.ts"],"mappings":";;;;;;wBAgBgB,0BAA0B;qBAgF7B,UAAQ;iBA8BJ;EACf;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;IACE;MACE;MACA;MACA;MACA;;;;iBAKW,sBAAsB;EACrC;EACA;EACA;EACA;;YAGU;EACN;EAAe;;EACf;EAAe"}
1
+ {"version":3,"file":"facebook.d.mts","names":[],"sources":["../../../src/oauth2/provider/facebook.ts"],"mappings":";;;;;wBAgBgB,0BAA0B;qBAgF7B,UAAQ;iBA8BJ;EACf;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;IACE;MACE;MACA;MACA;MACA;;;;iBAKW,sBAAsB;EACrC;EACA;EACA;EACA;;YAGU;EACN;EAAe;;EACf;EAAe"}
@@ -2,7 +2,7 @@ import { OAuth2Error } from "../error.mjs";
2
2
  import { createAuthorizationUri, exchangeAuthorizationCode, verifyIdToken } from "./common.mjs";
3
3
  import { createHmac } from "node:crypto";
4
4
  import { invariant } from "@shware/utils";
5
- //#region src/oauth2/provider/facebook.ts
5
+ // src/oauth2/provider/facebook.ts
6
6
  /**
7
7
  * `iss` of Limited Login id tokens, per https://limited.facebook.com/.well-known/openid-configuration/
8
8
  * (their `aud` is the app id).
@@ -112,7 +112,6 @@ async function fetchUserInfo(userInfoUri, accessToken, appSecretProof) {
112
112
  }
113
113
  };
114
114
  }
115
- //#endregion
116
115
  export { createFacebookProvider, facebook };
117
116
 
118
117
  //# sourceMappingURL=facebook.mjs.map
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_oauth2_error = require("../error.cjs");
3
3
  const require_oauth2_provider_common = require("./common.cjs");
4
4
  let _shware_utils = require("@shware/utils");
5
- //#region src/oauth2/provider/github.ts
5
+ // src/oauth2/provider/github.ts
6
6
  /**
7
7
  * GitHub's REST API rejects any request without a `User-Agent` header with a 403. Node's fetch sends
8
8
  * a default one, but Cloudflare Workers' fetch sends none, so every GitHub request sets it explicitly.
@@ -82,7 +82,6 @@ function createGithubProvider() {
82
82
  };
83
83
  }
84
84
  const github = createGithubProvider();
85
- //#endregion
86
85
  exports.createGithubProvider = createGithubProvider;
87
86
  exports.github = github;
88
87
 
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.cjs";
2
- //#region src/oauth2/provider/github.d.ts
3
2
  export declare function createGithubProvider(): Provider;
4
3
  export declare const github: Provider;
5
4
  export interface GithubUserInfo {
@@ -55,5 +54,4 @@ export interface GithubToken extends OAuth2Token {
55
54
  expires_in: number;
56
55
  refresh_token: string;
57
56
  }
58
- //#endregion
59
57
  //# sourceMappingURL=github.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.cts","names":[],"sources":["../../../src/oauth2/provider/github.ts"],"mappings":";;wBAmBgB,wBAAwB;qBAqE3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;;;iBAWa,oBAAoB;EACnC;EACA;EACA;EACA;EACA"}
1
+ {"version":3,"file":"github.d.cts","names":[],"sources":["../../../src/oauth2/provider/github.ts"],"mappings":";wBAmBgB,wBAAwB;qBAqE3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;;;iBAWa,oBAAoB;EACnC;EACA;EACA;EACA;EACA"}
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.mjs";
2
- //#region src/oauth2/provider/github.d.ts
3
2
  export declare function createGithubProvider(): Provider;
4
3
  export declare const github: Provider;
5
4
  export interface GithubUserInfo {
@@ -55,5 +54,4 @@ export interface GithubToken extends OAuth2Token {
55
54
  expires_in: number;
56
55
  refresh_token: string;
57
56
  }
58
- //#endregion
59
57
  //# sourceMappingURL=github.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"github.d.mts","names":[],"sources":["../../../src/oauth2/provider/github.ts"],"mappings":";;wBAmBgB,wBAAwB;qBAqE3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;;;iBAWa,oBAAoB;EACnC;EACA;EACA;EACA;EACA"}
1
+ {"version":3,"file":"github.d.mts","names":[],"sources":["../../../src/oauth2/provider/github.ts"],"mappings":";wBAmBgB,wBAAwB;qBAqE3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;IACA;IACA;;;iBAWa,oBAAoB;EACnC;EACA;EACA;EACA;EACA"}
@@ -1,7 +1,7 @@
1
1
  import { OAuth2Error } from "../error.mjs";
2
2
  import { createAuthorizationUri, exchangeAuthorizationCode } from "./common.mjs";
3
3
  import { invariant } from "@shware/utils";
4
- //#region src/oauth2/provider/github.ts
4
+ // src/oauth2/provider/github.ts
5
5
  /**
6
6
  * GitHub's REST API rejects any request without a `User-Agent` header with a 403. Node's fetch sends
7
7
  * a default one, but Cloudflare Workers' fetch sends none, so every GitHub request sets it explicitly.
@@ -81,7 +81,6 @@ function createGithubProvider() {
81
81
  };
82
82
  }
83
83
  const github = createGithubProvider();
84
- //#endregion
85
84
  export { createGithubProvider, github };
86
85
 
87
86
  //# sourceMappingURL=github.mjs.map
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_oauth2_error = require("../error.cjs");
3
3
  const require_oauth2_provider_common = require("./common.cjs");
4
4
  let _shware_utils = require("@shware/utils");
5
- //#region src/oauth2/provider/google.ts
5
+ // src/oauth2/provider/google.ts
6
6
  /** Google signs id tokens with either `iss`, the URL or the bare host. */
7
7
  const GOOGLE_ISSUERS = ["https://accounts.google.com", "accounts.google.com"];
8
8
  function claims(data) {
@@ -109,7 +109,6 @@ function createGoogleProvider() {
109
109
  };
110
110
  }
111
111
  const google = createGoogleProvider();
112
- //#endregion
113
112
  exports.createGoogleProvider = createGoogleProvider;
114
113
  exports.google = google;
115
114
 
@@ -1,5 +1,4 @@
1
1
  import { NativeCredential, OAuth2Token, OneTapProvider } from "../types.cjs";
2
- //#region src/oauth2/provider/google.d.ts
3
2
  export declare function createGoogleProvider(): OneTapProvider;
4
3
  export declare const google: OneTapProvider;
5
4
  export interface GoogleUserInfo {
@@ -39,5 +38,4 @@ export interface GoogleErrorResponse {
39
38
  error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'access_denied' | 'server_error';
40
39
  error_description: string;
41
40
  }
42
- //#endregion
43
41
  //# sourceMappingURL=google.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google.d.cts","names":[],"sources":["../../../src/oauth2/provider/google.ts"],"mappings":";;wBA0BgB,wBAAwB;qBAyF3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;;iBAIe,4BAA4B;EAC3C;EACA;EACA;EACA;;iBAGe;EACf;EAUA"}
1
+ {"version":3,"file":"google.d.cts","names":[],"sources":["../../../src/oauth2/provider/google.ts"],"mappings":";wBA0BgB,wBAAwB;qBAyF3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;;iBAIe,4BAA4B;EAC3C;EACA;EACA;EACA;;iBAGe;EACf;EAUA"}
@@ -1,5 +1,4 @@
1
1
  import { NativeCredential, OAuth2Token, OneTapProvider } from "../types.mjs";
2
- //#region src/oauth2/provider/google.d.ts
3
2
  export declare function createGoogleProvider(): OneTapProvider;
4
3
  export declare const google: OneTapProvider;
5
4
  export interface GoogleUserInfo {
@@ -39,5 +38,4 @@ export interface GoogleErrorResponse {
39
38
  error: 'invalid_request' | 'invalid_client' | 'invalid_grant' | 'invalid_token' | 'invalid_scope' | 'unauthorized_client' | 'unsupported_grant_type' | 'access_denied' | 'server_error';
40
39
  error_description: string;
41
40
  }
42
- //#endregion
43
41
  //# sourceMappingURL=google.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"google.d.mts","names":[],"sources":["../../../src/oauth2/provider/google.ts"],"mappings":";;wBA0BgB,wBAAwB;qBAyF3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;;iBAIe,4BAA4B;EAC3C;EACA;EACA;EACA;;iBAGe;EACf;EAUA"}
1
+ {"version":3,"file":"google.d.mts","names":[],"sources":["../../../src/oauth2/provider/google.ts"],"mappings":";wBA0BgB,wBAAwB;qBAyF3B,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA;;iBAIe,4BAA4B;EAC3C;EACA;EACA;EACA;;iBAGe;EACf;EAUA"}
@@ -1,7 +1,7 @@
1
1
  import { OAuth2Error } from "../error.mjs";
2
2
  import { createAuthorizationUri, exchangeAuthorizationCode, verifyIdToken } from "./common.mjs";
3
3
  import { invariant } from "@shware/utils";
4
- //#region src/oauth2/provider/google.ts
4
+ // src/oauth2/provider/google.ts
5
5
  /** Google signs id tokens with either `iss`, the URL or the bare host. */
6
6
  const GOOGLE_ISSUERS = ["https://accounts.google.com", "accounts.google.com"];
7
7
  function claims(data) {
@@ -108,7 +108,6 @@ function createGoogleProvider() {
108
108
  };
109
109
  }
110
110
  const google = createGoogleProvider();
111
- //#endregion
112
111
  export { createGoogleProvider, google };
113
112
 
114
113
  //# sourceMappingURL=google.mjs.map
@@ -1,7 +1,7 @@
1
1
  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
- //#region src/oauth2/provider/wechat.ts
4
+ // src/oauth2/provider/wechat.ts
5
5
  /**
6
6
  * WeChat error codes mapped to the closest OAuth2 error. Anything not listed is a `server_error`.
7
7
  * reference: https://developers.weixin.qq.com/doc/oplatform/Return_codes/Return_code_descriptions_new.html
@@ -127,7 +127,6 @@ function createWechatProvider(options = { isWechatBrowser: false }) {
127
127
  };
128
128
  }
129
129
  const wechat = createWechatProvider();
130
- //#endregion
131
130
  exports.createWechatProvider = createWechatProvider;
132
131
  exports.wechat = wechat;
133
132
 
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.cjs";
2
- //#region src/oauth2/provider/wechat.d.ts
3
2
  export type Options = {
4
3
  isWechatBrowser: boolean;
5
4
  };
@@ -34,5 +33,4 @@ export interface WechatToken extends OAuth2Token {
34
33
  scope: string;
35
34
  unionid?: string;
36
35
  }
37
- //#endregion
38
36
  //# sourceMappingURL=wechat.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wechat.d.cts","names":[],"sources":["../../../src/oauth2/provider/wechat.ts"],"mappings":";;YAkDY;EAAY;;;;;wBAKR,qBAAqB,UAAS,UAAuC;qBA2DxE,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;;;EAQA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA"}
1
+ {"version":3,"file":"wechat.d.cts","names":[],"sources":["../../../src/oauth2/provider/wechat.ts"],"mappings":";YAkDY;EAAY;;;;;wBAKR,qBAAqB,UAAS,UAAuC;qBA2DxE,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;;;EAQA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA"}
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.mjs";
2
- //#region src/oauth2/provider/wechat.d.ts
3
2
  export type Options = {
4
3
  isWechatBrowser: boolean;
5
4
  };
@@ -34,5 +33,4 @@ export interface WechatToken extends OAuth2Token {
34
33
  scope: string;
35
34
  unionid?: string;
36
35
  }
37
- //#endregion
38
36
  //# sourceMappingURL=wechat.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wechat.d.mts","names":[],"sources":["../../../src/oauth2/provider/wechat.ts"],"mappings":";;YAkDY;EAAY;;;;;wBAKR,qBAAqB,UAAS,UAAuC;qBA2DxE,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;;;EAQA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA"}
1
+ {"version":3,"file":"wechat.d.mts","names":[],"sources":["../../../src/oauth2/provider/wechat.ts"],"mappings":";YAkDY;EAAY;;;;;wBAKR,qBAAqB,UAAS,UAAuC;qBA2DxE,QAAM;iBAEF;EACf;EACA;EACA;EACA;EACA;EACA;;;;;;;;EAQA;EACA;EACA;;iBAGe,oBAAoB;EACnC;EACA;EACA;EACA;EACA;EACA"}
@@ -1,6 +1,6 @@
1
1
  import { OAuth2Error } from "../error.mjs";
2
2
  import { invariant } from "@shware/utils";
3
- //#region src/oauth2/provider/wechat.ts
3
+ // src/oauth2/provider/wechat.ts
4
4
  /**
5
5
  * WeChat error codes mapped to the closest OAuth2 error. Anything not listed is a `server_error`.
6
6
  * reference: https://developers.weixin.qq.com/doc/oplatform/Return_codes/Return_code_descriptions_new.html
@@ -126,7 +126,6 @@ function createWechatProvider(options = { isWechatBrowser: false }) {
126
126
  };
127
127
  }
128
128
  const wechat = createWechatProvider();
129
- //#endregion
130
129
  export { createWechatProvider, wechat };
131
130
 
132
131
  //# sourceMappingURL=wechat.mjs.map
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_oauth2_error = require("../error.cjs");
3
3
  const require_oauth2_provider_common = require("./common.cjs");
4
4
  let _shware_utils = require("@shware/utils");
5
- //#region src/oauth2/provider/x.ts
5
+ // src/oauth2/provider/x.ts
6
6
  const defaultUserFields = [
7
7
  "id",
8
8
  "name",
@@ -99,7 +99,6 @@ function createXProvider(options) {
99
99
  };
100
100
  }
101
101
  const x = createXProvider();
102
- //#endregion
103
102
  exports.createXProvider = createXProvider;
104
103
  exports.x = x;
105
104
 
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Token, Provider } from "../types.cjs";
2
- //#region src/oauth2/provider/x.d.ts
3
2
  export interface XOptions {
4
3
  userFields?: UserField[];
5
4
  }
@@ -64,6 +63,5 @@ export interface XToken extends OAuth2Token {
64
63
  scope: string;
65
64
  refresh_token: string;
66
65
  }
67
- //#endregion
68
66
  export {};
69
67
  //# sourceMappingURL=x.d.cts.map