@aura-stack/auth 0.4.0-rc.5 → 0.4.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 (143) hide show
  1. package/dist/@types/index.d.ts +4 -3
  2. package/dist/@types/router.d.cjs +0 -17
  3. package/dist/@types/router.d.d.ts +3 -2
  4. package/dist/@types/router.d.js +0 -1
  5. package/dist/actions/callback/access-token.cjs +40 -25
  6. package/dist/actions/callback/access-token.d.ts +4 -3
  7. package/dist/actions/callback/access-token.js +3 -4
  8. package/dist/actions/callback/callback.cjs +287 -77
  9. package/dist/actions/callback/callback.d.ts +5 -26
  10. package/dist/actions/callback/callback.js +13 -10
  11. package/dist/actions/callback/userinfo.cjs +68 -7
  12. package/dist/actions/callback/userinfo.d.ts +4 -3
  13. package/dist/actions/callback/userinfo.js +8 -6
  14. package/dist/actions/csrfToken/csrfToken.cjs +63 -4
  15. package/dist/actions/csrfToken/csrfToken.d.ts +1 -3
  16. package/dist/actions/csrfToken/csrfToken.js +8 -6
  17. package/dist/actions/index.cjs +400 -175
  18. package/dist/actions/index.d.ts +3 -2
  19. package/dist/actions/index.js +21 -19
  20. package/dist/actions/session/session.cjs +40 -11
  21. package/dist/actions/session/session.d.ts +1 -3
  22. package/dist/actions/session/session.js +4 -4
  23. package/dist/actions/signIn/authorization.cjs +171 -132
  24. package/dist/actions/signIn/authorization.d.ts +21 -11
  25. package/dist/actions/signIn/authorization.js +8 -6
  26. package/dist/actions/signIn/signIn.cjs +220 -113
  27. package/dist/actions/signIn/signIn.d.ts +5 -25
  28. package/dist/actions/signIn/signIn.js +9 -7
  29. package/dist/actions/signOut/signOut.cjs +268 -119
  30. package/dist/actions/signOut/signOut.d.ts +1 -9
  31. package/dist/actions/signOut/signOut.js +10 -8
  32. package/dist/assert.cjs +117 -5
  33. package/dist/assert.d.ts +22 -3
  34. package/dist/assert.js +17 -3
  35. package/dist/chunk-4EKY7655.js +123 -0
  36. package/dist/chunk-4MYWAOLG.js +31 -0
  37. package/dist/chunk-4YHJ4IEQ.js +25 -0
  38. package/dist/chunk-54CZPKR4.js +25 -0
  39. package/dist/chunk-5LZ7TOM3.js +25 -0
  40. package/dist/{chunk-W6LG7BFW.js → chunk-5W4BRQYG.js} +24 -20
  41. package/dist/chunk-6MXFPFR3.js +143 -0
  42. package/dist/{chunk-3EUWD5BB.js → chunk-7QF22LHP.js} +13 -9
  43. package/dist/chunk-ALG3GIV4.js +95 -0
  44. package/dist/chunk-E6G5YCI6.js +25 -0
  45. package/dist/chunk-EBAMFRB7.js +34 -0
  46. package/dist/chunk-EEE7UM5T.js +25 -0
  47. package/dist/{chunk-TLE4PXY3.js → chunk-FRJFWTOY.js} +38 -7
  48. package/dist/chunk-FW4W3REU.js +25 -0
  49. package/dist/{chunk-HT4YLL7N.js → chunk-ICAZ4OVS.js} +10 -8
  50. package/dist/chunk-IPKO6UQN.js +25 -0
  51. package/dist/{chunk-YRCB5FLE.js → chunk-KJBAQZX2.js} +13 -0
  52. package/dist/chunk-KMMAZFSJ.js +25 -0
  53. package/dist/chunk-LDU7A2JE.js +25 -0
  54. package/dist/{chunk-N2APGLXA.js → chunk-NUDITUKX.js} +18 -16
  55. package/dist/chunk-OVHNRULD.js +33 -0
  56. package/dist/{chunk-JVFTCTTE.js → chunk-PHFH2MGS.js} +12 -9
  57. package/dist/chunk-QQVSRXGX.js +149 -0
  58. package/dist/chunk-TM5IPSNF.js +113 -0
  59. package/dist/{chunk-GA2SMTJO.js → chunk-TZB6MUXN.js} +33 -13
  60. package/dist/chunk-VNCNJKS2.js +267 -0
  61. package/dist/{chunk-IVET23KF.js → chunk-XGLBNXL4.js} +31 -14
  62. package/dist/chunk-XUP6KKNG.js +106 -0
  63. package/dist/cookie.cjs +24 -20
  64. package/dist/cookie.d.ts +4 -3
  65. package/dist/cookie.js +1 -1
  66. package/dist/env.cjs +56 -0
  67. package/dist/env.d.ts +7 -0
  68. package/dist/env.js +6 -0
  69. package/dist/errors.d.ts +4 -3
  70. package/dist/headers.cjs +28 -2
  71. package/dist/headers.d.ts +25 -1
  72. package/dist/headers.js +9 -3
  73. package/dist/{index-B8jeIElf.d.ts → index-CSyIJmCM.d.ts} +373 -45
  74. package/dist/index.cjs +1128 -483
  75. package/dist/index.d.ts +7 -67
  76. package/dist/index.js +83 -42
  77. package/dist/jose.cjs +62 -25
  78. package/dist/jose.d.ts +7 -5
  79. package/dist/jose.js +8 -6
  80. package/dist/logger.cjs +292 -0
  81. package/dist/logger.d.ts +8 -0
  82. package/dist/logger.js +8 -0
  83. package/dist/oauth/bitbucket.cjs +19 -15
  84. package/dist/oauth/bitbucket.d.ts +3 -2
  85. package/dist/oauth/bitbucket.js +1 -1
  86. package/dist/oauth/discord.cjs +27 -24
  87. package/dist/oauth/discord.d.ts +3 -2
  88. package/dist/oauth/discord.js +1 -1
  89. package/dist/oauth/figma.cjs +19 -16
  90. package/dist/oauth/figma.d.ts +3 -2
  91. package/dist/oauth/figma.js +1 -1
  92. package/dist/oauth/github.cjs +19 -8
  93. package/dist/oauth/github.d.ts +3 -2
  94. package/dist/oauth/github.js +1 -1
  95. package/dist/oauth/gitlab.cjs +19 -16
  96. package/dist/oauth/gitlab.d.ts +3 -2
  97. package/dist/oauth/gitlab.js +1 -1
  98. package/dist/oauth/index.cjs +266 -166
  99. package/dist/oauth/index.d.ts +3 -2
  100. package/dist/oauth/index.js +22 -21
  101. package/dist/oauth/mailchimp.cjs +19 -16
  102. package/dist/oauth/mailchimp.d.ts +3 -2
  103. package/dist/oauth/mailchimp.js +1 -1
  104. package/dist/oauth/pinterest.cjs +19 -16
  105. package/dist/oauth/pinterest.d.ts +3 -2
  106. package/dist/oauth/pinterest.js +1 -1
  107. package/dist/oauth/spotify.cjs +19 -16
  108. package/dist/oauth/spotify.d.ts +3 -2
  109. package/dist/oauth/spotify.js +1 -1
  110. package/dist/oauth/strava.cjs +19 -16
  111. package/dist/oauth/strava.d.ts +3 -2
  112. package/dist/oauth/strava.js +1 -1
  113. package/dist/oauth/x.cjs +19 -16
  114. package/dist/oauth/x.d.ts +3 -2
  115. package/dist/oauth/x.js +1 -1
  116. package/dist/schemas.cjs +16 -2
  117. package/dist/schemas.d.ts +17 -1
  118. package/dist/schemas.js +5 -3
  119. package/dist/secure.cjs +58 -16
  120. package/dist/secure.d.ts +4 -10
  121. package/dist/secure.js +5 -5
  122. package/dist/utils.cjs +94 -87
  123. package/dist/utils.d.ts +9 -39
  124. package/dist/utils.js +11 -9
  125. package/package.json +3 -4
  126. package/dist/chunk-42XB3YCW.js +0 -22
  127. package/dist/chunk-6R2YZ4AC.js +0 -22
  128. package/dist/chunk-A3N4PVAT.js +0 -70
  129. package/dist/chunk-B737EUJV.js +0 -22
  130. package/dist/chunk-CXLATHS5.js +0 -143
  131. package/dist/chunk-DIVDFNAP.js +0 -0
  132. package/dist/chunk-E3OXBRYF.js +0 -22
  133. package/dist/chunk-EIL2FPSS.js +0 -22
  134. package/dist/chunk-EMKJA2GJ.js +0 -89
  135. package/dist/chunk-FIPU4MLT.js +0 -21
  136. package/dist/chunk-FKRDCWBF.js +0 -22
  137. package/dist/chunk-HP34YGGJ.js +0 -22
  138. package/dist/chunk-IKHPGFCW.js +0 -14
  139. package/dist/chunk-IUYZQTJV.js +0 -30
  140. package/dist/chunk-KRNOMBXQ.js +0 -22
  141. package/dist/chunk-KSWLO5ZU.js +0 -102
  142. package/dist/chunk-N4SX7TZT.js +0 -96
  143. package/dist/chunk-STHEPPUZ.js +0 -11
@@ -0,0 +1,292 @@
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/logger.ts
21
+ var logger_exports = {};
22
+ __export(logger_exports, {
23
+ createLogEntry: () => createLogEntry,
24
+ logMessages: () => logMessages
25
+ });
26
+ module.exports = __toCommonJS(logger_exports);
27
+ var logMessages = {
28
+ ROUTER_INTERNAL_ERROR: {
29
+ facility: 10,
30
+ severity: "error",
31
+ msgId: "ROUTER_INTERNAL_ERROR",
32
+ message: "Unhandled router error while processing the request"
33
+ },
34
+ INVALID_REQUEST: {
35
+ facility: 10,
36
+ severity: "warning",
37
+ msgId: "INVALID_REQUEST",
38
+ message: "Request validation failed against the expected schema"
39
+ },
40
+ SERVER_ERROR: {
41
+ facility: 10,
42
+ severity: "error",
43
+ msgId: "SERVER_ERROR",
44
+ message: "Unexpected internal server error during authentication"
45
+ },
46
+ OAUTH_PROTOCOL_ERROR: {
47
+ facility: 10,
48
+ severity: "warning",
49
+ msgId: "OAUTH_PROTOCOL_ERROR",
50
+ message: "OAuth provider returned an invalid or unexpected protocol response"
51
+ },
52
+ OAUTH_AUTHORIZATION_ERROR: {
53
+ facility: 10,
54
+ severity: "error",
55
+ msgId: "OAUTH_AUTHORIZATION_ERROR",
56
+ message: "OAuth authorization request was rejected or failed"
57
+ },
58
+ INVALID_OAUTH_CONFIGURATION: {
59
+ facility: 10,
60
+ severity: "error",
61
+ msgId: "INVALID_OAUTH_CONFIGURATION",
62
+ message: "The OAuth provider configuration is invalid or incomplete"
63
+ },
64
+ OAUTH_ACCESS_TOKEN_REQUEST_INITIATED: {
65
+ facility: 10,
66
+ severity: "debug",
67
+ msgId: "OAUTH_ACCESS_TOKEN_REQUEST_INITIATED",
68
+ message: "Starting OAuth access token request to the provider"
69
+ },
70
+ INVALID_OAUTH_ACCESS_TOKEN_RESPONSE: {
71
+ facility: 10,
72
+ severity: "error",
73
+ msgId: "INVALID_OAUTH_ACCESS_TOKEN_RESPONSE",
74
+ message: "OAuth access token endpoint returned an invalid or malformed response"
75
+ },
76
+ OAUTH_ACCESS_TOKEN_ERROR: {
77
+ facility: 10,
78
+ severity: "error",
79
+ msgId: "OAUTH_ACCESS_TOKEN_ERROR",
80
+ message: "OAuth access token endpoint returned an error response"
81
+ },
82
+ OAUTH_ACCESS_TOKEN_SUCCESS: {
83
+ facility: 10,
84
+ severity: "info",
85
+ msgId: "OAUTH_ACCESS_TOKEN_SUCCESS",
86
+ message: "Successfully retrieved OAuth access token from the provider"
87
+ },
88
+ OAUTH_ACCESS_TOKEN_REQUEST_FAILED: {
89
+ facility: 10,
90
+ severity: "error",
91
+ msgId: "OAUTH_ACCESS_TOKEN_REQUEST_FAILED",
92
+ message: "Network or server error while requesting OAuth access token"
93
+ },
94
+ OAUTH_USERINFO_REQUEST_INITIATED: {
95
+ facility: 10,
96
+ severity: "debug",
97
+ msgId: "OAUTH_USERINFO_REQUEST_INITIATED",
98
+ message: "Starting OAuth userinfo request to the provider"
99
+ },
100
+ OAUTH_USERINFO_INVALID_RESPONSE: {
101
+ facility: 10,
102
+ severity: "error",
103
+ msgId: "OAUTH_USERINFO_INVALID_RESPONSE",
104
+ message: "OAuth userinfo endpoint returned an invalid or malformed response"
105
+ },
106
+ OAUTH_USERINFO_ERROR: {
107
+ facility: 10,
108
+ severity: "error",
109
+ msgId: "OAUTH_USERINFO_ERROR",
110
+ message: "OAuth userinfo endpoint returned an error response"
111
+ },
112
+ OAUTH_USERINFO_SUCCESS: {
113
+ facility: 10,
114
+ severity: "info",
115
+ msgId: "OAUTH_USERINFO_SUCCESS",
116
+ message: "Successfully retrieved user information from the OAuth provider"
117
+ },
118
+ OAUTH_USERINFO_REQUEST_FAILED: {
119
+ facility: 10,
120
+ severity: "error",
121
+ msgId: "OAUTH_USERINFO_REQUEST_FAILED",
122
+ message: "Network or server error while requesting user information from the OAuth provider"
123
+ },
124
+ OAUTH_CALLBACK_SUCCESS: {
125
+ facility: 4,
126
+ severity: "info",
127
+ msgId: "OAUTH_CALLBACK_SUCCESS",
128
+ message: "OAuth callback completed successfully and session was created"
129
+ },
130
+ MISMATCHING_STATE: {
131
+ facility: 4,
132
+ severity: "critical",
133
+ msgId: "MISMATCHING_STATE",
134
+ message: "OAuth response state parameter does not match the stored state value"
135
+ },
136
+ POTENTIAL_OPEN_REDIRECT_ATTACK_DETECTED: {
137
+ facility: 4,
138
+ severity: "critical",
139
+ msgId: "POTENTIAL_OPEN_REDIRECT_ATTACK_DETECTED",
140
+ message: "Blocked redirect to untrusted or external URL (potential open redirect attack)"
141
+ },
142
+ OPEN_REDIRECT_ATTACK: {
143
+ facility: 4,
144
+ severity: "warning",
145
+ msgId: "OPEN_REDIRECT_ATTACK",
146
+ message: "Detected redirect target that does not match the trusted origin"
147
+ },
148
+ SESSION_TOKEN_MISSING: {
149
+ facility: 4,
150
+ severity: "warning",
151
+ msgId: "SESSION_TOKEN_MISSING",
152
+ message: "Session cookie is missing from the request"
153
+ },
154
+ CSRF_TOKEN_MISSING: {
155
+ facility: 4,
156
+ severity: "warning",
157
+ msgId: "CSRF_TOKEN_MISSING",
158
+ message: "CSRF token cookie is missing from the request"
159
+ },
160
+ CSRF_HEADER_MISSING: {
161
+ facility: 4,
162
+ severity: "warning",
163
+ msgId: "CSRF_HEADER_MISSING",
164
+ message: "CSRF header is missing from the request"
165
+ },
166
+ CSRF_TOKEN_INVALID: {
167
+ facility: 4,
168
+ severity: "error",
169
+ msgId: "CSRF_TOKEN_INVALID",
170
+ message: "CSRF token verification failed or token is invalid"
171
+ },
172
+ SIGN_IN_INITIATED: {
173
+ facility: 4,
174
+ severity: "info",
175
+ msgId: "SIGN_IN_INITIATED",
176
+ message: "Starting OAuth sign-in flow for the selected provider"
177
+ },
178
+ SIGN_OUT_ATTEMPT: {
179
+ facility: 4,
180
+ severity: "debug",
181
+ msgId: "SIGN_OUT_ATTEMPT",
182
+ message: "Received sign-out request from client"
183
+ },
184
+ SIGN_OUT_CSRF_VERIFIED: {
185
+ facility: 4,
186
+ severity: "info",
187
+ msgId: "SIGN_OUT_CSRF_VERIFIED",
188
+ message: "CSRF token was successfully verified during sign-out"
189
+ },
190
+ SIGN_OUT_SUCCESS: {
191
+ facility: 4,
192
+ severity: "info",
193
+ msgId: "SIGN_OUT_SUCCESS",
194
+ message: "User session was cleared and sign-out completed successfully"
195
+ },
196
+ SIGN_OUT_REDIRECT: {
197
+ facility: 4,
198
+ severity: "debug",
199
+ msgId: "SIGN_OUT_REDIRECT",
200
+ message: "Redirecting client after successful sign-out"
201
+ },
202
+ AUTH_SESSION_VALID: {
203
+ facility: 4,
204
+ severity: "info",
205
+ msgId: "AUTH_SESSION_VALID",
206
+ message: "Session token is valid and user session was returned"
207
+ },
208
+ AUTH_SESSION_INVALID: {
209
+ facility: 4,
210
+ severity: "notice",
211
+ msgId: "AUTH_SESSION_INVALID",
212
+ message: "Session token is missing, expired, or invalid"
213
+ },
214
+ INVALID_JWT_TOKEN: {
215
+ facility: 4,
216
+ severity: "warning",
217
+ msgId: "INVALID_JWT_TOKEN",
218
+ message: "JWT session token failed validation during sign-out"
219
+ },
220
+ CSRF_TOKEN_REQUESTED: {
221
+ facility: 4,
222
+ severity: "debug",
223
+ msgId: "CSRF_TOKEN_REQUESTED",
224
+ message: "Client requested a CSRF token"
225
+ },
226
+ CSRF_TOKEN_ISSUED: {
227
+ facility: 4,
228
+ severity: "debug",
229
+ msgId: "CSRF_TOKEN_ISSUED",
230
+ message: "Issued a new CSRF token to the client"
231
+ },
232
+ INVALID_URL: {
233
+ facility: 10,
234
+ severity: "error",
235
+ msgId: "INVALID_URL",
236
+ message: "Derived origin URL is invalid or malformed"
237
+ },
238
+ COOKIE_HTTPONLY_DISABLED: {
239
+ facility: 10,
240
+ severity: "critical",
241
+ msgId: "COOKIE_HTTPONLY_DISABLED",
242
+ message: "Cookie is configured without HttpOnly. This allows JavaScript access via document.cookie and increases XSS exposure."
243
+ },
244
+ COOKIE_WILDCARD_DOMAIN: {
245
+ facility: 10,
246
+ severity: "critical",
247
+ msgId: "COOKIE_WILDCARD_DOMAIN",
248
+ message: "Cookie 'Domain' is set to a wildcard, which is insecure and should be avoided."
249
+ },
250
+ COOKIE_SECURE_DISABLED: {
251
+ facility: 10,
252
+ severity: "warning",
253
+ msgId: "COOKIE_SECURE_DISABLED",
254
+ message: "Cookie is configured with 'Secure' but the request is not HTTPS. The 'Secure' attribute will be ignored by the browser."
255
+ },
256
+ COOKIE_SAMESITE_NONE_WITHOUT_SECURE: {
257
+ facility: 10,
258
+ severity: "warning",
259
+ msgId: "COOKIE_SAMESITE_NONE_WITHOUT_SECURE",
260
+ message: "Cookie uses SameSite=None without Secure. Falling back to SameSite=Lax for safer defaults."
261
+ },
262
+ COOKIE_INSECURE_IN_PRODUCTION: {
263
+ facility: 10,
264
+ severity: "critical",
265
+ msgId: "COOKIE_INSECURE_IN_PRODUCTION",
266
+ message: "Cookies are being served over an insecure connection in production, which is a serious security risk."
267
+ },
268
+ COOKIE_HOST_STRATEGY_INSECURE: {
269
+ facility: 10,
270
+ severity: "critical",
271
+ msgId: "COOKIE_HOST_STRATEGY_INSECURE",
272
+ message: "__Host- cookies require a secure HTTPS context. Falling back to standard cookie settings."
273
+ },
274
+ UNTRUSTED_ORIGIN: {
275
+ facility: 10,
276
+ severity: "error",
277
+ msgId: "UNTRUSTED_ORIGIN",
278
+ message: "The constructed origin URL is not trusted."
279
+ }
280
+ };
281
+ var createLogEntry = (key, overrides) => {
282
+ const message = logMessages[key];
283
+ return {
284
+ ...message,
285
+ ...overrides
286
+ };
287
+ };
288
+ // Annotate the CommonJS export names for ESM import in node:
289
+ 0 && (module.exports = {
290
+ createLogEntry,
291
+ logMessages
292
+ });
@@ -0,0 +1,8 @@
1
+ export { m as createLogEntry, l as logMessages } from './index-CSyIJmCM.js';
2
+ import 'zod';
3
+ import './schemas.js';
4
+ import './jose.js';
5
+ import '@aura-stack/jose';
6
+ import '@aura-stack/jose/jose';
7
+ import '@aura-stack/router/cookie';
8
+ import './@types/utility.js';
package/dist/logger.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ createLogEntry,
3
+ logMessages
4
+ } from "./chunk-VNCNJKS2.js";
5
+ export {
6
+ createLogEntry,
7
+ logMessages
8
+ };
@@ -23,21 +23,25 @@ __export(bitbucket_exports, {
23
23
  bitbucket: () => bitbucket
24
24
  });
25
25
  module.exports = __toCommonJS(bitbucket_exports);
26
- var bitbucket = {
27
- id: "bitbucket",
28
- name: "Bitbucket",
29
- authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
30
- accessToken: "https://bitbucket.org/site/oauth2/access_token",
31
- userInfo: "https://api.bitbucket.org/2.0/user",
32
- scope: "account email",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.uuid ?? profile.account_id,
37
- name: profile.display_name ?? profile.nickname,
38
- image: profile.links.avatar.href
39
- };
40
- }
26
+ var bitbucket = (options) => {
27
+ return {
28
+ id: "bitbucket",
29
+ name: "Bitbucket",
30
+ authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
31
+ accessToken: "https://bitbucket.org/site/oauth2/access_token",
32
+ userInfo: "https://api.bitbucket.org/2.0/user",
33
+ scope: "account email",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.uuid ?? profile.account_id,
38
+ name: profile.display_name ?? profile.nickname,
39
+ image: profile.links.avatar?.href,
40
+ email: void 0
41
+ };
42
+ },
43
+ ...options
44
+ };
41
45
  };
42
46
  // Annotate the CommonJS export names for ESM import in node:
43
47
  0 && (module.exports = {
@@ -1,7 +1,8 @@
1
- export { B as BitbucketProfile, v as bitbucket } from '../index-B8jeIElf.js';
1
+ export { H as BitbucketProfile, K as bitbucket } from '../index-CSyIJmCM.js';
2
2
  import '../@types/utility.js';
3
3
  import 'zod';
4
4
  import '../schemas.js';
5
- import '@aura-stack/router/cookie';
5
+ import '../jose.js';
6
6
  import '@aura-stack/jose';
7
7
  import '@aura-stack/jose/jose';
8
+ import '@aura-stack/router/cookie';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  bitbucket
3
- } from "../chunk-FIPU4MLT.js";
3
+ } from "../chunk-4YHJ4IEQ.js";
4
4
  export {
5
5
  bitbucket
6
6
  };
@@ -23,30 +23,33 @@ __export(discord_exports, {
23
23
  discord: () => discord
24
24
  });
25
25
  module.exports = __toCommonJS(discord_exports);
26
- var discord = {
27
- id: "discord",
28
- name: "Discord",
29
- authorizeURL: "https://discord.com/oauth2/authorize",
30
- accessToken: "https://discord.com/api/oauth2/token",
31
- userInfo: "https://discord.com/api/users/@me",
32
- scope: "identify email",
33
- responseType: "code",
34
- profile(profile) {
35
- let image = "";
36
- if (profile.avatar === null) {
37
- const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5;
38
- image = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
39
- } else {
40
- const format = profile.avatar.startsWith("a_") ? "gif" : "png";
41
- image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`;
42
- }
43
- return {
44
- sub: profile.id,
45
- name: profile.global_name ?? profile.username,
46
- email: profile.email ?? "",
47
- image
48
- };
49
- }
26
+ var discord = (options) => {
27
+ return {
28
+ id: "discord",
29
+ name: "Discord",
30
+ authorizeURL: "https://discord.com/oauth2/authorize",
31
+ accessToken: "https://discord.com/api/oauth2/token",
32
+ userInfo: "https://discord.com/api/users/@me",
33
+ scope: "identify email",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ let image = "";
37
+ if (profile.avatar === null) {
38
+ const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5;
39
+ image = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
40
+ } else {
41
+ const format = profile.avatar.startsWith("a_") ? "gif" : "png";
42
+ image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`;
43
+ }
44
+ return {
45
+ sub: profile.id,
46
+ name: profile.global_name ?? profile.username,
47
+ email: profile.email ?? "",
48
+ image
49
+ };
50
+ },
51
+ ...options
52
+ };
50
53
  };
51
54
  // Annotate the CommonJS export names for ESM import in node:
52
55
  0 && (module.exports = {
@@ -1,7 +1,8 @@
1
- export { D as DiscordProfile, N as Nameplate, t as discord } from '../index-B8jeIElf.js';
1
+ export { D as DiscordProfile, N as Nameplate, z as discord } from '../index-CSyIJmCM.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import '../jose.js';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/router/cookie';
7
8
  import '../@types/utility.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  discord
3
- } from "../chunk-IUYZQTJV.js";
3
+ } from "../chunk-OVHNRULD.js";
4
4
  export {
5
5
  discord
6
6
  };
@@ -23,22 +23,25 @@ __export(figma_exports, {
23
23
  figma: () => figma
24
24
  });
25
25
  module.exports = __toCommonJS(figma_exports);
26
- var figma = {
27
- id: "figma",
28
- name: "Figma",
29
- authorizeURL: "https://www.figma.com/oauth",
30
- accessToken: "https://api.figma.com/v1/oauth/token",
31
- userInfo: "https://api.figma.com/v1/me",
32
- scope: "current_user:read",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.id,
37
- name: profile.handle,
38
- email: profile.email,
39
- image: profile.img_url
40
- };
41
- }
26
+ var figma = (options) => {
27
+ return {
28
+ id: "figma",
29
+ name: "Figma",
30
+ authorizeURL: "https://www.figma.com/oauth",
31
+ accessToken: "https://api.figma.com/v1/oauth/token",
32
+ userInfo: "https://api.figma.com/v1/me",
33
+ scope: "current_user:read",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.id,
38
+ name: profile.handle,
39
+ email: profile.email,
40
+ image: profile.img_url
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,8 @@
1
- export { F as FigmaProfile, u as figma } from '../index-B8jeIElf.js';
1
+ export { F as FigmaProfile, B as figma } from '../index-CSyIJmCM.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import '../jose.js';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/router/cookie';
7
8
  import '../@types/utility.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  figma
3
- } from "../chunk-FKRDCWBF.js";
3
+ } from "../chunk-KMMAZFSJ.js";
4
4
  export {
5
5
  figma
6
6
  };
@@ -23,14 +23,25 @@ __export(github_exports, {
23
23
  github: () => github
24
24
  });
25
25
  module.exports = __toCommonJS(github_exports);
26
- var github = {
27
- id: "github",
28
- name: "GitHub",
29
- authorizeURL: "https://github.com/login/oauth/authorize",
30
- accessToken: "https://github.com/login/oauth/access_token",
31
- userInfo: "https://api.github.com/user",
32
- scope: "read:user user:email",
33
- responseType: "code"
26
+ var github = (options) => {
27
+ return {
28
+ id: "github",
29
+ name: "GitHub",
30
+ authorizeURL: "https://github.com/login/oauth/authorize",
31
+ accessToken: "https://github.com/login/oauth/access_token",
32
+ userInfo: "https://api.github.com/user",
33
+ scope: "read:user user:email",
34
+ responseType: "code",
35
+ profile: (profile) => {
36
+ return {
37
+ sub: profile.id.toString(),
38
+ name: profile.name ?? profile.login,
39
+ email: profile.email ?? void 0,
40
+ image: profile.avatar_url
41
+ };
42
+ },
43
+ ...options
44
+ };
34
45
  };
35
46
  // Annotate the CommonJS export names for ESM import in node:
36
47
  0 && (module.exports = {
@@ -1,7 +1,8 @@
1
- export { w as GitHubProfile, y as github } from '../index-B8jeIElf.js';
1
+ export { Q as GitHubProfile, V as github } from '../index-CSyIJmCM.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import '../jose.js';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/router/cookie';
7
8
  import '../@types/utility.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  github
3
- } from "../chunk-IKHPGFCW.js";
3
+ } from "../chunk-FW4W3REU.js";
4
4
  export {
5
5
  github
6
6
  };
@@ -23,22 +23,25 @@ __export(gitlab_exports, {
23
23
  gitlab: () => gitlab
24
24
  });
25
25
  module.exports = __toCommonJS(gitlab_exports);
26
- var gitlab = {
27
- id: "gitlab",
28
- name: "GitLab",
29
- authorizeURL: "https://gitlab.com/oauth/authorize",
30
- accessToken: "https://gitlab.com/oauth/token",
31
- userInfo: "https://gitlab.com/api/v4/user",
32
- scope: "read_user",
33
- responseType: "code",
34
- profile(profile) {
35
- return {
36
- sub: profile.id.toString(),
37
- name: profile.name ?? profile.username,
38
- email: profile.email,
39
- avatar: profile.avatar_url
40
- };
41
- }
26
+ var gitlab = (options) => {
27
+ return {
28
+ id: "gitlab",
29
+ name: "GitLab",
30
+ authorizeURL: "https://gitlab.com/oauth/authorize",
31
+ accessToken: "https://gitlab.com/oauth/token",
32
+ userInfo: "https://gitlab.com/api/v4/user",
33
+ scope: "read_user",
34
+ responseType: "code",
35
+ profile(profile) {
36
+ return {
37
+ sub: profile.id.toString(),
38
+ name: profile.name ?? profile.username,
39
+ email: profile.email,
40
+ image: profile.avatar_url
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,8 @@
1
- export { G as GitLabProfile, r as gitlab } from '../index-B8jeIElf.js';
1
+ export { G as GitLabProfile, y as gitlab } from '../index-CSyIJmCM.js';
2
2
  import 'zod';
3
3
  import '../schemas.js';
4
- import '@aura-stack/router/cookie';
4
+ import '../jose.js';
5
5
  import '@aura-stack/jose';
6
6
  import '@aura-stack/jose/jose';
7
+ import '@aura-stack/router/cookie';
7
8
  import '../@types/utility.js';
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  gitlab
3
- } from "../chunk-KRNOMBXQ.js";
3
+ } from "../chunk-5LZ7TOM3.js";
4
4
  export {
5
5
  gitlab
6
6
  };