@aura-stack/auth 0.4.0-rc.5 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/@types/index.d.ts +8 -3
  2. package/dist/@types/router.d.cjs +0 -17
  3. package/dist/@types/router.d.d.ts +7 -2
  4. package/dist/@types/router.d.js +0 -1
  5. package/dist/actions/callback/access-token.cjs +130 -71
  6. package/dist/actions/callback/access-token.d.ts +9 -4
  7. package/dist/actions/callback/access-token.js +3 -4
  8. package/dist/actions/callback/callback.cjs +428 -152
  9. package/dist/actions/callback/callback.d.ts +11 -3
  10. package/dist/actions/callback/callback.js +12 -10
  11. package/dist/actions/callback/userinfo.cjs +159 -65
  12. package/dist/actions/callback/userinfo.d.ts +8 -3
  13. package/dist/actions/callback/userinfo.js +7 -6
  14. package/dist/actions/csrfToken/csrfToken.cjs +70 -19
  15. package/dist/actions/csrfToken/csrfToken.js +8 -7
  16. package/dist/actions/index.cjs +780 -348
  17. package/dist/actions/index.d.ts +6 -2
  18. package/dist/actions/index.js +23 -18
  19. package/dist/actions/session/session.cjs +107 -26
  20. package/dist/actions/session/session.js +7 -5
  21. package/dist/actions/signIn/authorization-url.cjs +288 -0
  22. package/dist/actions/signIn/authorization-url.d.ts +31 -0
  23. package/dist/actions/signIn/authorization-url.js +16 -0
  24. package/dist/actions/signIn/authorization.cjs +209 -211
  25. package/dist/actions/signIn/authorization.d.ts +32 -21
  26. package/dist/actions/signIn/authorization.js +12 -9
  27. package/dist/actions/signIn/signIn.cjs +470 -235
  28. package/dist/actions/signIn/signIn.d.ts +12 -3
  29. package/dist/actions/signIn/signIn.js +11 -8
  30. package/dist/actions/signOut/signOut.cjs +376 -228
  31. package/dist/actions/signOut/signOut.d.ts +1 -1
  32. package/dist/actions/signOut/signOut.js +10 -9
  33. package/dist/api/createApi.cjs +750 -0
  34. package/dist/api/createApi.d.ts +12 -0
  35. package/dist/api/createApi.js +19 -0
  36. package/dist/api/getSession.cjs +141 -0
  37. package/dist/api/getSession.d.ts +16 -0
  38. package/dist/api/getSession.js +10 -0
  39. package/dist/api/signIn.cjs +549 -0
  40. package/dist/api/signIn.d.ts +26 -0
  41. package/dist/api/signIn.js +15 -0
  42. package/dist/api/signOut.cjs +279 -0
  43. package/dist/api/signOut.d.ts +16 -0
  44. package/dist/api/signOut.js +13 -0
  45. package/dist/assert.cjs +150 -5
  46. package/dist/assert.d.ts +26 -3
  47. package/dist/assert.js +17 -3
  48. package/dist/{chunk-YRCB5FLE.js → chunk-2A5B7GWR.js} +52 -6
  49. package/dist/chunk-2GQLSIJ2.js +40 -0
  50. package/dist/chunk-2IR674WX.js +44 -0
  51. package/dist/chunk-3J5TUH2I.js +50 -0
  52. package/dist/chunk-4RWSYUKX.js +98 -0
  53. package/dist/chunk-4YHJ4IEQ.js +25 -0
  54. package/dist/chunk-54CZPKR4.js +25 -0
  55. package/dist/chunk-5LZ7TOM3.js +25 -0
  56. package/dist/chunk-7BE46WWS.js +88 -0
  57. package/dist/chunk-7YYXFKLR.js +35 -0
  58. package/dist/chunk-C3A37LQC.js +33 -0
  59. package/dist/chunk-CITNGXDA.js +31 -0
  60. package/dist/chunk-CWX724AG.js +78 -0
  61. package/dist/chunk-D2CSIUKP.js +74 -0
  62. package/dist/chunk-E6G5YCI6.js +25 -0
  63. package/dist/chunk-EBAMFRB7.js +34 -0
  64. package/dist/chunk-EEE7UM5T.js +25 -0
  65. package/dist/{chunk-HT4YLL7N.js → chunk-FPCVZUVG.js} +10 -8
  66. package/dist/chunk-FW4W3REU.js +25 -0
  67. package/dist/chunk-GNNBM2WJ.js +83 -0
  68. package/dist/chunk-IPKO6UQN.js +25 -0
  69. package/dist/chunk-JOCGX3RP.js +59 -0
  70. package/dist/chunk-KBXWTD6E.js +94 -0
  71. package/dist/chunk-KMMAZFSJ.js +25 -0
  72. package/dist/chunk-LATR3NIV.js +117 -0
  73. package/dist/chunk-LAYPUDQF.js +39 -0
  74. package/dist/chunk-LDU7A2JE.js +25 -0
  75. package/dist/chunk-LX3TJ2TJ.js +294 -0
  76. package/dist/chunk-NHZBQNRR.js +143 -0
  77. package/dist/chunk-OVHNRULD.js +33 -0
  78. package/dist/chunk-PDP3PHB3.js +127 -0
  79. package/dist/chunk-PHYNROD4.js +47 -0
  80. package/dist/chunk-QQEKY4XP.js +29 -0
  81. package/dist/chunk-U4RK4LKJ.js +348 -0
  82. package/dist/{chunk-RRLIF4PQ.js → chunk-U5663F2U.js} +16 -1
  83. package/dist/chunk-UN7X6SU5.js +53 -0
  84. package/dist/chunk-UZQJJD6A.js +100 -0
  85. package/dist/chunk-V6LLEAR4.js +80 -0
  86. package/dist/chunk-WHNDRO3N.js +50 -0
  87. package/dist/{chunk-W6LG7BFW.js → chunk-XY5R3EHH.js} +30 -23
  88. package/dist/client/client.cjs +135 -0
  89. package/dist/client/client.d.ts +85 -0
  90. package/dist/client/client.js +9 -0
  91. package/dist/client/index.cjs +135 -0
  92. package/dist/client/index.d.ts +14 -0
  93. package/dist/client/index.js +10 -0
  94. package/dist/context.cjs +1237 -0
  95. package/dist/context.d.ts +16 -0
  96. package/dist/context.js +28 -0
  97. package/dist/cookie.cjs +57 -22
  98. package/dist/cookie.d.ts +11 -6
  99. package/dist/cookie.js +3 -2
  100. package/dist/createAuth.cjs +2320 -0
  101. package/dist/createAuth.d.ts +12 -0
  102. package/dist/createAuth.js +48 -0
  103. package/dist/env.cjs +78 -0
  104. package/dist/env.d.ts +10 -0
  105. package/dist/env.js +12 -0
  106. package/dist/errors.cjs +17 -0
  107. package/dist/errors.d.ts +15 -4
  108. package/dist/errors.js +5 -1
  109. package/dist/headers.cjs +28 -2
  110. package/dist/headers.d.ts +25 -1
  111. package/dist/headers.js +9 -3
  112. package/dist/index-_aXtxb_s.d.ts +1377 -0
  113. package/dist/index.cjs +1843 -610
  114. package/dist/index.d.ts +11 -92
  115. package/dist/index.js +53 -85
  116. package/dist/jose.cjs +113 -38
  117. package/dist/jose.d.ts +12 -23
  118. package/dist/jose.js +17 -7
  119. package/dist/logger.cjs +424 -0
  120. package/dist/logger.d.ts +12 -0
  121. package/dist/logger.js +17 -0
  122. package/dist/oauth/atlassian.cjs +57 -0
  123. package/dist/oauth/atlassian.d.ts +12 -0
  124. package/dist/oauth/atlassian.js +6 -0
  125. package/dist/oauth/bitbucket.cjs +19 -15
  126. package/dist/oauth/bitbucket.d.ts +7 -2
  127. package/dist/oauth/bitbucket.js +1 -1
  128. package/dist/oauth/discord.cjs +27 -24
  129. package/dist/oauth/discord.d.ts +7 -2
  130. package/dist/oauth/discord.js +1 -1
  131. package/dist/oauth/dropbox.cjs +53 -0
  132. package/dist/oauth/dropbox.d.ts +12 -0
  133. package/dist/oauth/dropbox.js +6 -0
  134. package/dist/oauth/figma.cjs +19 -16
  135. package/dist/oauth/figma.d.ts +7 -2
  136. package/dist/oauth/figma.js +1 -1
  137. package/dist/oauth/github.cjs +19 -8
  138. package/dist/oauth/github.d.ts +7 -2
  139. package/dist/oauth/github.js +1 -1
  140. package/dist/oauth/gitlab.cjs +19 -16
  141. package/dist/oauth/gitlab.d.ts +7 -2
  142. package/dist/oauth/gitlab.js +1 -1
  143. package/dist/oauth/index.cjs +529 -239
  144. package/dist/oauth/index.d.ts +7 -2
  145. package/dist/oauth/index.js +39 -22
  146. package/dist/oauth/mailchimp.cjs +19 -16
  147. package/dist/oauth/mailchimp.d.ts +7 -2
  148. package/dist/oauth/mailchimp.js +1 -1
  149. package/dist/oauth/notion.cjs +131 -0
  150. package/dist/oauth/notion.d.ts +12 -0
  151. package/dist/oauth/notion.js +9 -0
  152. package/dist/oauth/pinterest.cjs +19 -16
  153. package/dist/oauth/pinterest.d.ts +7 -2
  154. package/dist/oauth/pinterest.js +1 -1
  155. package/dist/oauth/spotify.cjs +19 -16
  156. package/dist/oauth/spotify.d.ts +7 -2
  157. package/dist/oauth/spotify.js +1 -1
  158. package/dist/oauth/strava.cjs +19 -16
  159. package/dist/oauth/strava.d.ts +7 -2
  160. package/dist/oauth/strava.js +1 -1
  161. package/dist/oauth/twitch.cjs +95 -0
  162. package/dist/oauth/twitch.d.ts +12 -0
  163. package/dist/oauth/twitch.js +7 -0
  164. package/dist/oauth/x.cjs +19 -16
  165. package/dist/oauth/x.d.ts +7 -2
  166. package/dist/oauth/x.js +1 -1
  167. package/dist/schemas.cjs +89 -42
  168. package/dist/schemas.d.ts +114 -18
  169. package/dist/schemas.js +5 -3
  170. package/dist/secure.cjs +73 -31
  171. package/dist/secure.d.ts +11 -11
  172. package/dist/secure.js +7 -6
  173. package/dist/utils.cjs +203 -90
  174. package/dist/utils.d.ts +21 -40
  175. package/dist/utils.js +21 -12
  176. package/package.json +9 -6
  177. package/dist/chunk-3EUWD5BB.js +0 -63
  178. package/dist/chunk-42XB3YCW.js +0 -22
  179. package/dist/chunk-6R2YZ4AC.js +0 -22
  180. package/dist/chunk-A3N4PVAT.js +0 -70
  181. package/dist/chunk-B737EUJV.js +0 -22
  182. package/dist/chunk-CXLATHS5.js +0 -143
  183. package/dist/chunk-E3OXBRYF.js +0 -22
  184. package/dist/chunk-EIL2FPSS.js +0 -22
  185. package/dist/chunk-EMKJA2GJ.js +0 -89
  186. package/dist/chunk-FIPU4MLT.js +0 -21
  187. package/dist/chunk-FKRDCWBF.js +0 -22
  188. package/dist/chunk-GA2SMTJO.js +0 -58
  189. package/dist/chunk-HP34YGGJ.js +0 -22
  190. package/dist/chunk-IKHPGFCW.js +0 -14
  191. package/dist/chunk-IUYZQTJV.js +0 -30
  192. package/dist/chunk-IVET23KF.js +0 -58
  193. package/dist/chunk-JVFTCTTE.js +0 -33
  194. package/dist/chunk-KRNOMBXQ.js +0 -22
  195. package/dist/chunk-KSWLO5ZU.js +0 -102
  196. package/dist/chunk-N2APGLXA.js +0 -71
  197. package/dist/chunk-N4SX7TZT.js +0 -96
  198. package/dist/chunk-STHEPPUZ.js +0 -11
  199. package/dist/chunk-TLE4PXY3.js +0 -39
  200. package/dist/index-B8jeIElf.d.ts +0 -679
  201. /package/dist/{chunk-DIVDFNAP.js → chunk-5X7JZMEF.js} +0 -0
@@ -1,7 +1,12 @@
1
- export { B as BitbucketProfile, K as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, w as GitHubProfile, G as GitLabProfile, I as Image, L as Login, M as MailchimpProfile, N as Nameplate, P as PinterestProfile, o as SpotifyProfile, n as StravaProfile, k as SummaryClub, l as SummaryGear, X as XProfile, v as bitbucket, z as builtInOAuthProviders, H as createBuiltInOAuthProviders, t as discord, u as figma, y as github, r as gitlab, m as mailchimp, p as pinterest, q as spotify, s as strava, x } from '../index-B8jeIElf.js';
1
+ export { W as AccountType, P as AtlassianProfile, at as BitbucketProfile, a0 as Bot, B as BuiltInOAuthProvider, ao as DiscordProfile, X as DropboxProfile, Q as ExtendedProfile, ar as FigmaProfile, Y as FullTeam, av as GitHubProfile, am as GitLabProfile, aa as Login, ab as MailchimpProfile, Z as Name, ap as Nameplate, a1 as NotionProfile, a2 as Owner, a3 as Person, a8 as PinterestProfile, _ as RootInfo, aj as SpotifyImage, ak as SpotifyProfile, ad as StravaProfile, ae as SummaryClub, af as SummaryGear, a6 as TwitchProfile, a4 as User, ah as XProfile, V as atlassian, au as bitbucket, v as builtInOAuthProviders, ax as createBuiltInOAuthProviders, aq as discord, $ as dropbox, as as figma, aw as github, an as gitlab, ac as mailchimp, a5 as notion, a9 as pinterest, al as spotify, ag as strava, a7 as twitch, ai as x } from '../index-_aXtxb_s.js';
2
2
  import '../@types/utility.js';
3
3
  import 'zod';
4
4
  import '../schemas.js';
5
- import '@aura-stack/router/cookie';
5
+ import 'zod/v4';
6
6
  import '@aura-stack/jose';
7
7
  import '@aura-stack/jose/jose';
8
+ import '@aura-stack/jose/crypto';
9
+ import '@aura-stack/router/cookie';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -1,51 +1,68 @@
1
1
  import {
2
2
  builtInOAuthProviders,
3
3
  createBuiltInOAuthProviders
4
- } from "../chunk-EMKJA2GJ.js";
5
- import {
6
- x
7
- } from "../chunk-42XB3YCW.js";
8
- import {
9
- figma
10
- } from "../chunk-FKRDCWBF.js";
11
- import {
12
- github
13
- } from "../chunk-IKHPGFCW.js";
14
- import {
15
- gitlab
16
- } from "../chunk-KRNOMBXQ.js";
4
+ } from "../chunk-PDP3PHB3.js";
17
5
  import {
18
6
  mailchimp
19
- } from "../chunk-B737EUJV.js";
7
+ } from "../chunk-LDU7A2JE.js";
8
+ import {
9
+ notion
10
+ } from "../chunk-PHYNROD4.js";
20
11
  import {
21
12
  pinterest
22
- } from "../chunk-HP34YGGJ.js";
13
+ } from "../chunk-E6G5YCI6.js";
23
14
  import {
24
15
  spotify
25
- } from "../chunk-E3OXBRYF.js";
16
+ } from "../chunk-IPKO6UQN.js";
26
17
  import {
27
18
  strava
28
- } from "../chunk-6R2YZ4AC.js";
19
+ } from "../chunk-54CZPKR4.js";
20
+ import {
21
+ twitch
22
+ } from "../chunk-2GQLSIJ2.js";
23
+ import {
24
+ x
25
+ } from "../chunk-EEE7UM5T.js";
26
+ import {
27
+ atlassian
28
+ } from "../chunk-C3A37LQC.js";
29
29
  import {
30
30
  bitbucket
31
- } from "../chunk-FIPU4MLT.js";
31
+ } from "../chunk-4YHJ4IEQ.js";
32
32
  import {
33
33
  discord
34
- } from "../chunk-IUYZQTJV.js";
35
- import "../chunk-CXLATHS5.js";
36
- import "../chunk-RRLIF4PQ.js";
37
- import "../chunk-YRCB5FLE.js";
34
+ } from "../chunk-OVHNRULD.js";
35
+ import {
36
+ dropbox
37
+ } from "../chunk-QQEKY4XP.js";
38
+ import {
39
+ figma
40
+ } from "../chunk-KMMAZFSJ.js";
41
+ import {
42
+ github
43
+ } from "../chunk-FW4W3REU.js";
44
+ import {
45
+ gitlab
46
+ } from "../chunk-5LZ7TOM3.js";
47
+ import "../chunk-2A5B7GWR.js";
48
+ import "../chunk-LX3TJ2TJ.js";
49
+ import "../chunk-WHNDRO3N.js";
50
+ import "../chunk-U5663F2U.js";
38
51
  export {
52
+ atlassian,
39
53
  bitbucket,
40
54
  builtInOAuthProviders,
41
55
  createBuiltInOAuthProviders,
42
56
  discord,
57
+ dropbox,
43
58
  figma,
44
59
  github,
45
60
  gitlab,
46
61
  mailchimp,
62
+ notion,
47
63
  pinterest,
48
64
  spotify,
49
65
  strava,
66
+ twitch,
50
67
  x
51
68
  };
@@ -23,22 +23,25 @@ __export(mailchimp_exports, {
23
23
  mailchimp: () => mailchimp
24
24
  });
25
25
  module.exports = __toCommonJS(mailchimp_exports);
26
- var mailchimp = {
27
- id: "mailchimp",
28
- name: "Mailchimp",
29
- authorizeURL: "https://login.mailchimp.com/oauth2/authorize",
30
- accessToken: "https://login.mailchimp.com/oauth2/token",
31
- userInfo: "https://login.mailchimp.com/oauth2/metadata",
32
- scope: "",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.user_id,
37
- name: profile.accountname,
38
- email: profile.login.login_email,
39
- image: null
40
- };
41
- }
26
+ var mailchimp = (options) => {
27
+ return {
28
+ id: "mailchimp",
29
+ name: "Mailchimp",
30
+ authorizeURL: "https://login.mailchimp.com/oauth2/authorize",
31
+ accessToken: "https://login.mailchimp.com/oauth2/token",
32
+ userInfo: "https://login.mailchimp.com/oauth2/metadata",
33
+ scope: "",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.user_id,
38
+ name: profile.accountname,
39
+ email: profile.login.email,
40
+ image: profile.login.avatar
41
+ };
42
+ },
43
+ ...options
44
+ };
42
45
  };
43
46
  // Annotate the CommonJS export names for ESM import in node:
44
47
  0 && (module.exports = {
@@ -1,7 +1,12 @@
1
- export { L as Login, M as MailchimpProfile, m as mailchimp } from '../index-B8jeIElf.js';
1
+ export { aa as Login, ab as MailchimpProfile, ac as mailchimp } from '../index-_aXtxb_s.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import 'zod/v4';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/jose/crypto';
8
+ import '@aura-stack/router/cookie';
7
9
  import '../@types/utility.js';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  mailchimp
3
- } from "../chunk-B737EUJV.js";
3
+ } from "../chunk-LDU7A2JE.js";
4
4
  export {
5
5
  mailchimp
6
6
  };
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/oauth/notion.ts
21
+ var notion_exports = {};
22
+ __export(notion_exports, {
23
+ notion: () => notion
24
+ });
25
+ module.exports = __toCommonJS(notion_exports);
26
+
27
+ // src/utils.ts
28
+ var import_router = require("@aura-stack/router");
29
+
30
+ // src/errors.ts
31
+ var AuthInternalError = class extends Error {
32
+ type = "AUTH_INTERNAL_ERROR";
33
+ code;
34
+ constructor(code, message, options) {
35
+ super(message, options);
36
+ this.code = code;
37
+ this.name = new.target.name;
38
+ Error.captureStackTrace(this, new.target);
39
+ }
40
+ };
41
+
42
+ // src/env.ts
43
+ var import_meta = {};
44
+ var env = new Proxy({}, {
45
+ get(_, prop) {
46
+ if (typeof prop !== "string") return void 0;
47
+ const hasProperty = (process2) => {
48
+ return process2 && Object.prototype.hasOwnProperty.call(process2, prop);
49
+ };
50
+ try {
51
+ if (typeof process !== "undefined" && hasProperty(process.env)) {
52
+ return process.env[prop];
53
+ }
54
+ if (typeof import_meta !== "undefined" && hasProperty(import_meta.env)) {
55
+ return import_meta.env[prop];
56
+ }
57
+ if (typeof Deno !== "undefined" && Deno.env?.get) {
58
+ return Deno.env.get(prop);
59
+ }
60
+ if (typeof Bun !== "undefined" && hasProperty(Bun.env)) {
61
+ return Bun.env[prop];
62
+ }
63
+ const globalValue = globalThis[prop];
64
+ return typeof globalValue === "string" ? globalValue : void 0;
65
+ } catch {
66
+ return void 0;
67
+ }
68
+ }
69
+ });
70
+ var getEnv = (key) => {
71
+ const keys = [`AURA_AUTH_${key.toUpperCase()}`, `AURA_${key.toUpperCase()}`, `AUTH_${key.toUpperCase()}`, key.toUpperCase()];
72
+ return env[keys.find((k) => env[k]) ?? ""];
73
+ };
74
+
75
+ // src/assert.ts
76
+ var import_crypto = require("@aura-stack/jose/crypto");
77
+
78
+ // src/utils.ts
79
+ var createBasicAuthHeader = (username, password) => {
80
+ const getUsername = getEnv(username.toUpperCase()) ?? username;
81
+ const getPassword = getEnv(password.toUpperCase()) ?? password;
82
+ if (!getUsername || !getPassword) {
83
+ throw new AuthInternalError("INVALID_OAUTH_CONFIGURATION", "Missing client credentials for OAuth provider configuration.");
84
+ }
85
+ const credentials = `${getUsername}:${getPassword}`;
86
+ return `Basic ${btoa(credentials)}`;
87
+ };
88
+
89
+ // src/oauth/notion.ts
90
+ var notion = (options) => {
91
+ return {
92
+ id: "notion",
93
+ name: "Notion",
94
+ authorize: {
95
+ url: "https://api.notion.com/v1/oauth/authorize",
96
+ params: {
97
+ owner: "user",
98
+ scope: "user:read",
99
+ responseType: "code"
100
+ }
101
+ },
102
+ accessToken: {
103
+ url: "https://api.notion.com/v1/oauth/token",
104
+ headers: {
105
+ Authorization: createBasicAuthHeader(
106
+ options?.clientId ?? "NOTION_CLIENT_ID",
107
+ options?.clientSecret ?? "NOTION_CLIENT_SECRET"
108
+ )
109
+ }
110
+ },
111
+ userInfo: {
112
+ url: "https://api.notion.com/v1/users/me",
113
+ headers: {
114
+ "Notion-Version": "2022-06-28"
115
+ }
116
+ },
117
+ profile(profile) {
118
+ return {
119
+ sub: profile.id,
120
+ name: profile.name,
121
+ image: profile.avatar_url ?? "",
122
+ email: profile?.bot?.owner?.user?.person?.email
123
+ };
124
+ },
125
+ ...options
126
+ };
127
+ };
128
+ // Annotate the CommonJS export names for ESM import in node:
129
+ 0 && (module.exports = {
130
+ notion
131
+ });
@@ -0,0 +1,12 @@
1
+ export { a0 as Bot, a1 as NotionProfile, a2 as Owner, a3 as Person, a4 as User, a5 as notion } from '../index-_aXtxb_s.js';
2
+ import 'zod';
3
+ import '../schemas.js';
4
+ import 'zod/v4';
5
+ import '@aura-stack/jose';
6
+ import '@aura-stack/jose/jose';
7
+ import '@aura-stack/jose/crypto';
8
+ import '@aura-stack/router/cookie';
9
+ import '../@types/utility.js';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -0,0 +1,9 @@
1
+ import {
2
+ notion
3
+ } from "../chunk-PHYNROD4.js";
4
+ import "../chunk-LX3TJ2TJ.js";
5
+ import "../chunk-WHNDRO3N.js";
6
+ import "../chunk-U5663F2U.js";
7
+ export {
8
+ notion
9
+ };
@@ -23,22 +23,25 @@ __export(pinterest_exports, {
23
23
  pinterest: () => pinterest
24
24
  });
25
25
  module.exports = __toCommonJS(pinterest_exports);
26
- var pinterest = {
27
- id: "pinterest",
28
- name: "Pinterest",
29
- authorizeURL: "https://api.pinterest.com/oauth/",
30
- accessToken: "https://api.pinterest.com/v5/oauth/token",
31
- userInfo: "https://api.pinterest.com/v5/user_account",
32
- scope: "user_accounts:read",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.id,
37
- name: profile.username,
38
- email: null,
39
- image: profile.profile_image
40
- };
41
- }
26
+ var pinterest = (options) => {
27
+ return {
28
+ id: "pinterest",
29
+ name: "Pinterest",
30
+ authorizeURL: "https://www.pinterest.com/oauth",
31
+ accessToken: "https://api.pinterest.com/v5/oauth/token",
32
+ userInfo: "https://api.pinterest.com/v5/user_account",
33
+ scope: "user_accounts:read",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.id,
38
+ name: profile.username,
39
+ image: profile.profile_image,
40
+ email: void 0
41
+ };
42
+ },
43
+ ...options
44
+ };
42
45
  };
43
46
  // Annotate the CommonJS export names for ESM import in node:
44
47
  0 && (module.exports = {
@@ -1,7 +1,12 @@
1
- export { P as PinterestProfile, p as pinterest } from '../index-B8jeIElf.js';
1
+ export { a8 as PinterestProfile, a9 as pinterest } from '../index-_aXtxb_s.js';
2
2
  import '../@types/utility.js';
3
3
  import 'zod';
4
4
  import '../schemas.js';
5
- import '@aura-stack/router/cookie';
5
+ import 'zod/v4';
6
6
  import '@aura-stack/jose';
7
7
  import '@aura-stack/jose/jose';
8
+ import '@aura-stack/jose/crypto';
9
+ import '@aura-stack/router/cookie';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  pinterest
3
- } from "../chunk-HP34YGGJ.js";
3
+ } from "../chunk-E6G5YCI6.js";
4
4
  export {
5
5
  pinterest
6
6
  };
@@ -23,22 +23,25 @@ __export(spotify_exports, {
23
23
  spotify: () => spotify
24
24
  });
25
25
  module.exports = __toCommonJS(spotify_exports);
26
- var spotify = {
27
- id: "spotify",
28
- name: "Spotify",
29
- authorizeURL: "https://accounts.spotify.com/authorize",
30
- accessToken: "https://accounts.spotify.com/api/token",
31
- userInfo: "https://api.spotify.com/v1/me",
32
- scope: "user-read-email user-read-private",
33
- responseType: "token",
34
- profile(profile) {
35
- return {
36
- sub: profile.id,
37
- name: profile.display_name,
38
- email: profile.email,
39
- image: profile.images?.[0]?.url
40
- };
41
- }
26
+ var spotify = (options) => {
27
+ return {
28
+ id: "spotify",
29
+ name: "Spotify",
30
+ authorizeURL: "https://accounts.spotify.com/authorize",
31
+ accessToken: "https://accounts.spotify.com/api/token",
32
+ userInfo: "https://api.spotify.com/v1/me",
33
+ scope: "user-read-private user-read-email",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.id,
38
+ name: profile.display_name,
39
+ email: profile.email,
40
+ image: profile.images[0]?.url ?? void 0
41
+ };
42
+ },
43
+ ...options
44
+ };
42
45
  };
43
46
  // Annotate the CommonJS export names for ESM import in node:
44
47
  0 && (module.exports = {
@@ -1,7 +1,12 @@
1
- export { I as Image, o as SpotifyProfile, q as spotify } from '../index-B8jeIElf.js';
1
+ export { aj as SpotifyImage, ak as SpotifyProfile, al as spotify } from '../index-_aXtxb_s.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import 'zod/v4';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/jose/crypto';
8
+ import '@aura-stack/router/cookie';
7
9
  import '../@types/utility.js';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spotify
3
- } from "../chunk-E3OXBRYF.js";
3
+ } from "../chunk-IPKO6UQN.js";
4
4
  export {
5
5
  spotify
6
6
  };
@@ -23,22 +23,25 @@ __export(strava_exports, {
23
23
  strava: () => strava
24
24
  });
25
25
  module.exports = __toCommonJS(strava_exports);
26
- var strava = {
27
- id: "strava",
28
- name: "Strava",
29
- authorizeURL: "https://www.strava.com/oauth/authorize",
30
- accessToken: "https://www.strava.com/oauth/token",
31
- userInfo: "https://www.strava.com/api/v3/athlete",
32
- scope: "read",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.id.toString(),
37
- name: `${profile.firstname} ${profile.lastname}`,
38
- image: profile.profile,
39
- email: ""
40
- };
41
- }
26
+ var strava = (options) => {
27
+ return {
28
+ id: "strava",
29
+ name: "Strava",
30
+ authorizeURL: "https://www.strava.com/oauth/authorize",
31
+ accessToken: "https://www.strava.com/oauth/token",
32
+ userInfo: "https://www.strava.com/api/v3/athlete",
33
+ scope: "read",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.id.toString(),
38
+ name: `${profile.firstname} ${profile.lastname}`,
39
+ image: profile.profile,
40
+ email: void 0
41
+ };
42
+ },
43
+ ...options
44
+ };
42
45
  };
43
46
  // Annotate the CommonJS export names for ESM import in node:
44
47
  0 && (module.exports = {
@@ -1,7 +1,12 @@
1
- export { n as StravaProfile, k as SummaryClub, l as SummaryGear, s as strava } from '../index-B8jeIElf.js';
1
+ export { ad as StravaProfile, ae as SummaryClub, af as SummaryGear, ag as strava } from '../index-_aXtxb_s.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import 'zod/v4';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/jose/crypto';
8
+ import '@aura-stack/router/cookie';
7
9
  import '../@types/utility.js';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  strava
3
- } from "../chunk-6R2YZ4AC.js";
3
+ } from "../chunk-54CZPKR4.js";
4
4
  export {
5
5
  strava
6
6
  };
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/oauth/twitch.ts
21
+ var twitch_exports = {};
22
+ __export(twitch_exports, {
23
+ twitch: () => twitch
24
+ });
25
+ module.exports = __toCommonJS(twitch_exports);
26
+
27
+ // src/env.ts
28
+ var import_meta = {};
29
+ var env = new Proxy({}, {
30
+ get(_, prop) {
31
+ if (typeof prop !== "string") return void 0;
32
+ const hasProperty = (process2) => {
33
+ return process2 && Object.prototype.hasOwnProperty.call(process2, prop);
34
+ };
35
+ try {
36
+ if (typeof process !== "undefined" && hasProperty(process.env)) {
37
+ return process.env[prop];
38
+ }
39
+ if (typeof import_meta !== "undefined" && hasProperty(import_meta.env)) {
40
+ return import_meta.env[prop];
41
+ }
42
+ if (typeof Deno !== "undefined" && Deno.env?.get) {
43
+ return Deno.env.get(prop);
44
+ }
45
+ if (typeof Bun !== "undefined" && hasProperty(Bun.env)) {
46
+ return Bun.env[prop];
47
+ }
48
+ const globalValue = globalThis[prop];
49
+ return typeof globalValue === "string" ? globalValue : void 0;
50
+ } catch {
51
+ return void 0;
52
+ }
53
+ }
54
+ });
55
+ var getEnv = (key) => {
56
+ const keys = [`AURA_AUTH_${key.toUpperCase()}`, `AURA_${key.toUpperCase()}`, `AUTH_${key.toUpperCase()}`, key.toUpperCase()];
57
+ return env[keys.find((k) => env[k]) ?? ""];
58
+ };
59
+
60
+ // src/oauth/twitch.ts
61
+ var twitch = (options) => {
62
+ const clientId = options?.clientId ?? getEnv("TWITCH_CLIENT_ID");
63
+ return {
64
+ id: "twitch",
65
+ name: "Twitch",
66
+ authorize: {
67
+ url: "https://id.twitch.tv/oauth2/authorize",
68
+ params: { scope: "user:read:email", responseType: "code" }
69
+ },
70
+ accessToken: "https://id.twitch.tv/oauth2/token",
71
+ userInfo: {
72
+ url: "https://api.twitch.tv/helix/users",
73
+ headers: {
74
+ "Client-ID": clientId
75
+ }
76
+ },
77
+ profile(profile) {
78
+ const user = profile.data[0];
79
+ if (!user) {
80
+ throw new Error("No user data found in Twitch profile response");
81
+ }
82
+ return {
83
+ sub: user.id,
84
+ name: user.display_name,
85
+ email: user.email,
86
+ picture: user.profile_image_url
87
+ };
88
+ },
89
+ ...options
90
+ };
91
+ };
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ twitch
95
+ });
@@ -0,0 +1,12 @@
1
+ export { a6 as TwitchProfile, a7 as twitch } from '../index-_aXtxb_s.js';
2
+ import 'zod';
3
+ import '../schemas.js';
4
+ import 'zod/v4';
5
+ import '@aura-stack/jose';
6
+ import '@aura-stack/jose/jose';
7
+ import '@aura-stack/jose/crypto';
8
+ import '@aura-stack/router/cookie';
9
+ import '../@types/utility.js';
10
+ import 'jose';
11
+ import '@aura-stack/router';
12
+ import 'zod/v4/core';
@@ -0,0 +1,7 @@
1
+ import {
2
+ twitch
3
+ } from "../chunk-2GQLSIJ2.js";
4
+ import "../chunk-WHNDRO3N.js";
5
+ export {
6
+ twitch
7
+ };