@absolutejs/auth 0.22.6 → 0.23.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 (92) hide show
  1. package/README.md +6 -13
  2. package/dist/index.d.ts +300 -1
  3. package/dist/index.js +18 -15
  4. package/dist/index.js.map +4 -4
  5. package/dist/ui/index.d.ts +2 -0
  6. package/dist/ui/index.js +2212 -0
  7. package/dist/ui/index.js.map +11 -0
  8. package/dist/ui/renderers.d.ts +8 -0
  9. package/dist/ui/types.d.ts +85 -0
  10. package/package.json +71 -86
  11. package/dist/example/components/auth/AuthContainer.d.ts +0 -1
  12. package/dist/example/components/auth/OAuthButton.d.ts +0 -7
  13. package/dist/example/components/auth/OAuthButtons.d.ts +0 -5
  14. package/dist/example/components/hamburger/HamburgerDropdown.d.ts +0 -10
  15. package/dist/example/components/hamburger/HamburgerHeader.d.ts +0 -5
  16. package/dist/example/components/hamburger/HamburgerMenu.d.ts +0 -14
  17. package/dist/example/components/hamburger/HamburgerUserButtons.d.ts +0 -8
  18. package/dist/example/components/navbar/DropdownContainer.d.ts +0 -17
  19. package/dist/example/components/navbar/Navbar.d.ts +0 -7
  20. package/dist/example/components/navbar/NavbarDropdown.d.ts +0 -10
  21. package/dist/example/components/navbar/NavbarLink.d.ts +0 -8
  22. package/dist/example/components/navbar/NavbarLinks.d.ts +0 -6
  23. package/dist/example/components/navbar/NavbarUserButtons.d.ts +0 -7
  24. package/dist/example/components/page/Head.d.ts +0 -6
  25. package/dist/example/components/protected/AccountOverview.d.ts +0 -6
  26. package/dist/example/components/protected/DeleteAccountSection.d.ts +0 -5
  27. package/dist/example/components/protected/LinkedAuthIdentitiesPanel.d.ts +0 -1
  28. package/dist/example/components/protected/LinkedProvidersPanel.d.ts +0 -1
  29. package/dist/example/components/protected/ProviderButtons.d.ts +0 -1
  30. package/dist/example/components/protected/SettingsNoticeToast.d.ts +0 -1
  31. package/dist/example/components/protected/UserInfo.d.ts +0 -7
  32. package/dist/example/components/utils/AnimatedComponents.d.ts +0 -1
  33. package/dist/example/components/utils/Divider.d.ts +0 -7
  34. package/dist/example/components/utils/HighlightedJson.d.ts +0 -5
  35. package/dist/example/components/utils/JsonLine.d.ts +0 -6
  36. package/dist/example/components/utils/Modal.d.ts +0 -9
  37. package/dist/example/components/utils/ProfilePicture.d.ts +0 -8
  38. package/dist/example/components/utils/ProviderDropdown.d.ts +0 -8
  39. package/dist/example/components/utils/Toast.d.ts +0 -14
  40. package/dist/example/components/utils/ToastProvider.d.ts +0 -30
  41. package/dist/example/db/schema.d.ts +0 -2570
  42. package/dist/example/eden/treaty.d.ts +0 -1
  43. package/dist/example/handlers/userHandlers.d.ts +0 -254
  44. package/dist/example/hooks/useAuthIdentityPayload.d.ts +0 -37
  45. package/dist/example/hooks/useAuthStatus.d.ts +0 -19
  46. package/dist/example/hooks/useContainerQuery.d.ts +0 -10
  47. package/dist/example/hooks/useMediaQuery.d.ts +0 -11
  48. package/dist/example/linkedProviders/persistCallbackAuthorization.d.ts +0 -30
  49. package/dist/example/linkedProviders/resolver.d.ts +0 -1
  50. package/dist/example/linkedProviders/stores.d.ts +0 -9
  51. package/dist/example/pages/Connectors.d.ts +0 -1
  52. package/dist/example/pages/Home.d.ts +0 -1
  53. package/dist/example/pages/NotAuthorized.d.ts +0 -1
  54. package/dist/example/pages/Protected.d.ts +0 -1
  55. package/dist/example/pages/Settings.d.ts +0 -1
  56. package/dist/example/server.d.ts +0 -902
  57. package/dist/example/styles/authModalStyles.d.ts +0 -22
  58. package/dist/example/styles/navbarStyles.d.ts +0 -15
  59. package/dist/example/styles/styles.d.ts +0 -15
  60. package/dist/example/utils/absoluteAuthConfig.d.ts +0 -4
  61. package/dist/example/utils/constants.d.ts +0 -1
  62. package/dist/example/utils/navbarData.d.ts +0 -2
  63. package/dist/example/utils/providerData.d.ts +0 -9
  64. package/dist/example/utils/providersConfiguration.d.ts +0 -1
  65. package/dist/example/utils/typeGuards.d.ts +0 -1
  66. package/dist/example/utils/types.d.ts +0 -26
  67. package/dist/src/index.d.ts +0 -300
  68. /package/dist/{src/authSessionStores.d.ts → authSessionStores.d.ts} +0 -0
  69. /package/dist/{src/authorize.d.ts → authorize.d.ts} +0 -0
  70. /package/dist/{src/callback.d.ts → callback.d.ts} +0 -0
  71. /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
  72. /package/dist/{src/errors.d.ts → errors.d.ts} +0 -0
  73. /package/dist/{src/linkedProviderResolver.d.ts → linkedProviderResolver.d.ts} +0 -0
  74. /package/dist/{src/linkedProviderStores.d.ts → linkedProviderStores.d.ts} +0 -0
  75. /package/dist/{src/neonAuthSessionStore.d.ts → neonAuthSessionStore.d.ts} +0 -0
  76. /package/dist/{src/neonLinkedProviders.d.ts → neonLinkedProviders.d.ts} +0 -0
  77. /package/dist/{src/oauthLinkedProviderResolver.d.ts → oauthLinkedProviderResolver.d.ts} +0 -0
  78. /package/dist/{src/profile.d.ts → profile.d.ts} +0 -0
  79. /package/dist/{src/protectRoute.d.ts → protectRoute.d.ts} +0 -0
  80. /package/dist/{src/providerClients.d.ts → providerClients.d.ts} +0 -0
  81. /package/dist/{src/refresh.d.ts → refresh.d.ts} +0 -0
  82. /package/dist/{src/revoke.d.ts → revoke.d.ts} +0 -0
  83. /package/dist/{src/sessionAccess.d.ts → sessionAccess.d.ts} +0 -0
  84. /package/dist/{src/sessionCleanup.d.ts → sessionCleanup.d.ts} +0 -0
  85. /package/dist/{src/sessionStore.d.ts → sessionStore.d.ts} +0 -0
  86. /package/dist/{src/sessionTypes.d.ts → sessionTypes.d.ts} +0 -0
  87. /package/dist/{src/signout.d.ts → signout.d.ts} +0 -0
  88. /package/dist/{src/typeGuards.d.ts → typeGuards.d.ts} +0 -0
  89. /package/dist/{src/typebox.d.ts → typebox.d.ts} +0 -0
  90. /package/dist/{src/types.d.ts → types.d.ts} +0 -0
  91. /package/dist/{src/userStatus.d.ts → userStatus.d.ts} +0 -0
  92. /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
@@ -0,0 +1,2212 @@
1
+ // @bun
2
+ // node_modules/citra/dist/index.js
3
+ var NUM_GENERATOR_BYTES = 32;
4
+ var BASE64_BLOCK_SIZE = 4;
5
+ var anilistProfileQuery = `query {
6
+ Viewer {
7
+ id
8
+ name
9
+ about
10
+ avatar {
11
+ large
12
+ medium
13
+ }
14
+ bannerImage
15
+ siteUrl
16
+ createdAt
17
+ updatedAt
18
+ donatorTier
19
+ donatorBadge
20
+ unreadNotificationCount
21
+ options {
22
+ titleLanguage
23
+ displayAdultContent
24
+ airingNotifications
25
+ profileColor
26
+ activityMergeTime
27
+ staffNameLanguage
28
+ }
29
+ mediaListOptions {
30
+ scoreFormat
31
+ rowOrder
32
+ animeList {
33
+ sectionOrder
34
+ customLists
35
+ advancedScoringEnabled
36
+ }
37
+ mangaList {
38
+ sectionOrder
39
+ customLists
40
+ advancedScoringEnabled
41
+ }
42
+ }
43
+ statistics {
44
+ anime {
45
+ count
46
+ meanScore
47
+ minutesWatched
48
+ episodesWatched
49
+ }
50
+ manga {
51
+ count
52
+ meanScore
53
+ chaptersRead
54
+ volumesRead
55
+ }
56
+ }
57
+ favourites {
58
+ anime {
59
+ nodes {
60
+ id
61
+ title {
62
+ romaji
63
+ english
64
+ }
65
+ siteUrl
66
+ }
67
+ }
68
+ manga {
69
+ nodes {
70
+ id
71
+ title {
72
+ romaji
73
+ english
74
+ }
75
+ siteUrl
76
+ }
77
+ }
78
+ characters {
79
+ nodes {
80
+ id
81
+ name {
82
+ full
83
+ }
84
+ image {
85
+ large
86
+ }
87
+ }
88
+ }
89
+ staff {
90
+ nodes {
91
+ id
92
+ name {
93
+ full
94
+ }
95
+ image {
96
+ large
97
+ }
98
+ }
99
+ }
100
+ studios {
101
+ nodes {
102
+ id
103
+ name
104
+ siteUrl
105
+ }
106
+ }
107
+ }
108
+ isFollower
109
+ isFollowing
110
+ }
111
+ }`;
112
+ var defineProviders = (providers) => providers;
113
+ var providers = defineProviders({
114
+ "42": {
115
+ authorizationUrl: "https://api.intra.42.fr/oauth/authorize",
116
+ isOIDC: false,
117
+ isRefreshable: true,
118
+ profileRequest: {
119
+ authIn: "header",
120
+ encoding: "application/json",
121
+ method: "GET",
122
+ url: "https://api.intra.42.fr/v2/me"
123
+ },
124
+ scopeRequired: false,
125
+ subject: ["id"],
126
+ subjectType: "string",
127
+ tokenRequest: {
128
+ authIn: "body",
129
+ encoding: "application/x-www-form-urlencoded",
130
+ url: "https://api.intra.42.fr/oauth/token"
131
+ }
132
+ },
133
+ amazoncognito: {
134
+ authorizationUrl: "https://${domain}/oauth2/authorize",
135
+ isOIDC: true,
136
+ isRefreshable: true,
137
+ PKCEMethod: "S256",
138
+ profileRequest: {
139
+ authIn: "header",
140
+ encoding: "application/json",
141
+ method: "GET",
142
+ url: (config) => `https://${config.domain}/oauth2/userInfo`
143
+ },
144
+ revocationRequest: {
145
+ authIn: "body",
146
+ encoding: "application/json",
147
+ tokenParamName: "token",
148
+ url: (config) => `https://${config.domain}/oauth2/revoke`
149
+ },
150
+ scopeRequired: false,
151
+ subject: ["id"],
152
+ subjectType: "string",
153
+ tokenRequest: {
154
+ authIn: "body",
155
+ encoding: "application/x-www-form-urlencoded",
156
+ url: (config) => `https://${config.domain}/oauth2/token`
157
+ }
158
+ },
159
+ anilist: {
160
+ authorizationUrl: "https://anilist.co/api/v2/oauth/authorize",
161
+ isOIDC: false,
162
+ isRefreshable: true,
163
+ profileRequest: {
164
+ authIn: "header",
165
+ body: {
166
+ query: anilistProfileQuery
167
+ },
168
+ encoding: "application/json",
169
+ headers: {
170
+ Accept: "application/json",
171
+ "Content-Type": "application/json"
172
+ },
173
+ method: "POST",
174
+ url: "https://graphql.anilist.co"
175
+ },
176
+ scopeRequired: false,
177
+ subject: ["data", "Viewer", "id"],
178
+ subjectType: "number",
179
+ tokenRequest: {
180
+ authIn: "body",
181
+ encoding: "application/x-www-form-urlencoded",
182
+ url: "https://anilist.co/api/v2/oauth/token"
183
+ }
184
+ },
185
+ apple: {
186
+ authorizationUrl: "https://appleid.apple.com/auth/authorize",
187
+ isOIDC: true,
188
+ isRefreshable: true,
189
+ PKCEMethod: "S256",
190
+ profileRequest: {
191
+ authIn: "header",
192
+ encoding: "application/json",
193
+ method: "GET",
194
+ url: "https://appleid.apple.com/auth/userinfo"
195
+ },
196
+ scopeRequired: false,
197
+ subject: ["id"],
198
+ subjectType: "string",
199
+ tokenRequest: {
200
+ authIn: "body",
201
+ encoding: "application/x-www-form-urlencoded",
202
+ url: "https://appleid.apple.com/auth/token"
203
+ }
204
+ },
205
+ atlassian: {
206
+ authorizationUrl: "https://auth.atlassian.com/authorize",
207
+ createAuthorizationURLSearchParams: {
208
+ audience: "api.atlassian.com"
209
+ },
210
+ email: ["email"],
211
+ fullName: ["name"],
212
+ isOIDC: false,
213
+ isRefreshable: true,
214
+ picture: ["picture"],
215
+ profileRequest: {
216
+ authIn: "header",
217
+ encoding: "application/json",
218
+ method: "GET",
219
+ url: "https://api.atlassian.com/me"
220
+ },
221
+ scopeRequired: true,
222
+ subject: ["account_id"],
223
+ subjectType: "string",
224
+ tokenRequest: {
225
+ authIn: "body",
226
+ encoding: "application/x-www-form-urlencoded",
227
+ url: "https://auth.atlassian.com/oauth/token"
228
+ }
229
+ },
230
+ auth0: {
231
+ authorizationUrl: (config) => `https://${config.domain}/authorize`,
232
+ isOIDC: true,
233
+ isRefreshable: true,
234
+ PKCEMethod: "S256",
235
+ profileRequest: {
236
+ authIn: "header",
237
+ encoding: "application/json",
238
+ method: "GET",
239
+ url: (config) => `https://${config.domain}/userinfo`
240
+ },
241
+ revocationRequest: {
242
+ authIn: "body",
243
+ body: new URLSearchParams({
244
+ token_type_hint: "refresh_token"
245
+ }),
246
+ encoding: "application/json",
247
+ tokenParamName: "token",
248
+ url: (config) => `https://${config.domain}/oauth/revoke`
249
+ },
250
+ scopeRequired: false,
251
+ subject: ["id"],
252
+ subjectType: "string",
253
+ tokenRequest: {
254
+ authIn: "body",
255
+ encoding: "application/x-www-form-urlencoded",
256
+ url: (config) => `https://${config.domain}/oauth/token`
257
+ }
258
+ },
259
+ authentik: {
260
+ authorizationUrl: (config) => `https://${config.baseURL}/oauth/authorize`,
261
+ isOIDC: true,
262
+ isRefreshable: true,
263
+ PKCEMethod: "S256",
264
+ profileRequest: {
265
+ authIn: "header",
266
+ encoding: "application/json",
267
+ method: "GET",
268
+ url: (config) => `https://${config.baseURL}/api/v3/user/`
269
+ },
270
+ scopeRequired: false,
271
+ subject: ["id"],
272
+ subjectType: "string",
273
+ tokenRequest: {
274
+ authIn: "body",
275
+ encoding: "application/x-www-form-urlencoded",
276
+ url: (config) => `https://${config.baseURL}/oauth/token`
277
+ }
278
+ },
279
+ autodesk: {
280
+ authorizationUrl: "https://developer.api.autodesk.com/authentication/v2/authorize",
281
+ email: ["email"],
282
+ familyName: ["family_name"],
283
+ fullName: ["name"],
284
+ givenName: ["given_name"],
285
+ isOIDC: true,
286
+ isRefreshable: true,
287
+ picture: ["picture"],
288
+ PKCEMethod: "S256",
289
+ profileRequest: {
290
+ authIn: "header",
291
+ encoding: "application/json",
292
+ method: "GET",
293
+ url: "https://api.userprofile.autodesk.com/userinfo"
294
+ },
295
+ scopeRequired: false,
296
+ subject: ["id"],
297
+ subjectType: "string",
298
+ tokenRequest: {
299
+ authIn: "body",
300
+ encoding: "application/x-www-form-urlencoded",
301
+ url: "https://developer.api.autodesk.com/authentication/v2/token"
302
+ }
303
+ },
304
+ battlenet: {
305
+ authorizationUrl: "https://oauth.battle.net/authorize",
306
+ isOIDC: true,
307
+ isRefreshable: false,
308
+ profileRequest: {
309
+ authIn: "header",
310
+ encoding: "application/json",
311
+ method: "GET",
312
+ url: "https://oauth.battle.net/userinfo"
313
+ },
314
+ scopeRequired: false,
315
+ subject: ["id"],
316
+ subjectType: "string",
317
+ tokenRequest: {
318
+ authIn: "body",
319
+ encoding: "application/x-www-form-urlencoded",
320
+ url: "https://oauth.battle.net/token"
321
+ }
322
+ },
323
+ bitbucket: {
324
+ authorizationUrl: "https://bitbucket.org/site/oauth2/authorize",
325
+ fullName: ["display_name"],
326
+ isOIDC: false,
327
+ isRefreshable: true,
328
+ picture: ["links", "avatar", "href"],
329
+ profileRequest: {
330
+ authIn: "header",
331
+ encoding: "application/json",
332
+ method: "GET",
333
+ url: "https://api.bitbucket.org/2.0/user"
334
+ },
335
+ scopeRequired: false,
336
+ subject: ["uuid"],
337
+ subjectType: "string",
338
+ tokenRequest: {
339
+ authIn: "body",
340
+ encoding: "application/x-www-form-urlencoded",
341
+ url: "https://bitbucket.org/site/oauth2/access_token"
342
+ }
343
+ },
344
+ box: {
345
+ authorizationUrl: "https://account.box.com/api/oauth2/authorize",
346
+ email: ["login"],
347
+ fullName: ["name"],
348
+ isOIDC: false,
349
+ isRefreshable: true,
350
+ picture: ["avatar_url"],
351
+ profileRequest: {
352
+ authIn: "header",
353
+ encoding: "application/json",
354
+ method: "GET",
355
+ url: "https://api.box.com/2.0/users/me"
356
+ },
357
+ revocationRequest: {
358
+ authIn: "body",
359
+ encoding: "application/json",
360
+ tokenParamName: "token",
361
+ url: "https://api.box.com/oauth2/revoke"
362
+ },
363
+ scopeRequired: false,
364
+ subject: ["id"],
365
+ subjectType: "string",
366
+ tokenRequest: {
367
+ authIn: "body",
368
+ encoding: "application/x-www-form-urlencoded",
369
+ url: "https://api.box.com/oauth2/token"
370
+ }
371
+ },
372
+ bungie: {
373
+ authorizationUrl: "https://www.bungie.net/en/OAuth/Authorize",
374
+ isOIDC: false,
375
+ isRefreshable: true,
376
+ profileRequest: {
377
+ authIn: "header",
378
+ encoding: "application/json",
379
+ headers: {
380
+ "X-API-Key": "<YOUR_API_KEY>"
381
+ },
382
+ method: "GET",
383
+ url: "https://www.bungie.net/Platform/User/GetCurrentBungieNetUser"
384
+ },
385
+ scopeRequired: false,
386
+ subject: ["Response", "membershipId"],
387
+ subjectType: "number",
388
+ tokenRequest: {
389
+ authIn: "body",
390
+ encoding: "application/x-www-form-urlencoded",
391
+ url: "https://www.bungie.net/Platform/App/OAuth/token"
392
+ }
393
+ },
394
+ coinbase: {
395
+ authorizationUrl: "https://www.coinbase.com/oauth/authorize",
396
+ isOIDC: false,
397
+ isRefreshable: true,
398
+ profileRequest: {
399
+ authIn: "header",
400
+ encoding: "application/json",
401
+ method: "GET",
402
+ url: "https://api.coinbase.com/v2/user"
403
+ },
404
+ scopeRequired: false,
405
+ subject: ["data", "id"],
406
+ subjectType: "number",
407
+ tokenRequest: {
408
+ authIn: "body",
409
+ encoding: "application/x-www-form-urlencoded",
410
+ url: "https://api.coinbase.com/oauth/token"
411
+ }
412
+ },
413
+ discord: {
414
+ authorizationUrl: "https://discord.com/api/oauth2/authorize",
415
+ email: ["email"],
416
+ isOIDC: true,
417
+ isRefreshable: true,
418
+ picture: ["avatar"],
419
+ PKCEMethod: "S256",
420
+ profileRequest: {
421
+ authIn: "header",
422
+ encoding: "application/json",
423
+ method: "GET",
424
+ url: "https://discord.com/api/users/@me"
425
+ },
426
+ scopeRequired: true,
427
+ subject: ["id"],
428
+ subjectType: "string",
429
+ tokenRequest: {
430
+ authIn: "body",
431
+ encoding: "application/x-www-form-urlencoded",
432
+ url: "https://discord.com/api/oauth2/token"
433
+ }
434
+ },
435
+ donationalerts: {
436
+ authorizationUrl: "https://www.donationalerts.com/oauth/authorize",
437
+ email: ["data", "email"],
438
+ isOIDC: false,
439
+ isRefreshable: true,
440
+ picture: ["data", "avatar"],
441
+ profileRequest: {
442
+ authIn: "header",
443
+ encoding: "application/json",
444
+ method: "GET",
445
+ url: "https://www.donationalerts.com/api/v1/user/oauth"
446
+ },
447
+ scopeRequired: false,
448
+ subject: ["data", "id"],
449
+ subjectType: "number",
450
+ tokenRequest: {
451
+ authIn: "body",
452
+ encoding: "application/x-www-form-urlencoded",
453
+ url: "https://www.donationalerts.com/oauth/token"
454
+ }
455
+ },
456
+ dribbble: {
457
+ authorizationUrl: "https://dribbble.com/oauth/authorize",
458
+ isOIDC: false,
459
+ isRefreshable: false,
460
+ profileRequest: {
461
+ authIn: "header",
462
+ encoding: "application/json",
463
+ method: "GET",
464
+ url: "https://api.dribbble.com/v2/user"
465
+ },
466
+ scopeRequired: false,
467
+ subject: ["id"],
468
+ subjectType: "number",
469
+ tokenRequest: {
470
+ authIn: "body",
471
+ encoding: "application/x-www-form-urlencoded",
472
+ url: "https://dribbble.com/oauth/token"
473
+ }
474
+ },
475
+ dropbox: {
476
+ authorizationUrl: "https://www.dropbox.com/oauth2/authorize",
477
+ email: ["email"],
478
+ familyName: ["name", "surname"],
479
+ fullName: ["name", "display_name"],
480
+ givenName: ["name", "given_name"],
481
+ isOIDC: false,
482
+ isRefreshable: true,
483
+ profileRequest: {
484
+ authIn: "header",
485
+ encoding: "application/json",
486
+ method: "POST",
487
+ url: "https://api.dropboxapi.com/2/users/get_current_account"
488
+ },
489
+ revocationRequest: {
490
+ authIn: "header",
491
+ encoding: "application/json",
492
+ url: "https://api.dropboxapi.com/2/auth/token/revoke"
493
+ },
494
+ scopeRequired: false,
495
+ subject: ["account_id"],
496
+ subjectType: "string",
497
+ tokenRequest: {
498
+ authIn: "body",
499
+ encoding: "application/x-www-form-urlencoded",
500
+ url: "https://api.dropboxapi.com/oauth2/token"
501
+ }
502
+ },
503
+ epicgames: {
504
+ authorizationUrl: "https://www.epicgames.com/id/authorize",
505
+ isOIDC: false,
506
+ isRefreshable: true,
507
+ profileRequest: {
508
+ authIn: "header",
509
+ encoding: "application/json",
510
+ method: "GET",
511
+ url: "https://api.epicgames.dev/epic/oauth/v2/userInfo"
512
+ },
513
+ scopeRequired: false,
514
+ subject: ["account_id"],
515
+ subjectType: "number",
516
+ tokenRequest: {
517
+ authIn: "body",
518
+ encoding: "application/x-www-form-urlencoded",
519
+ url: "https://api.epicgames.dev/epic/oauth/v1/token"
520
+ }
521
+ },
522
+ etsy: {
523
+ authorizationUrl: "https://www.etsy.com/oauth/connect",
524
+ isOIDC: false,
525
+ isRefreshable: true,
526
+ profileRequest: {
527
+ authIn: "header",
528
+ encoding: "application/json",
529
+ method: "GET",
530
+ url: "https://openapi.etsy.com/v3/application/users/me"
531
+ },
532
+ scopeRequired: false,
533
+ subject: ["results", "0", "user_id"],
534
+ subjectType: "number",
535
+ tokenRequest: {
536
+ authIn: "body",
537
+ encoding: "application/x-www-form-urlencoded",
538
+ url: "https://api.etsy.com/v3/public/oauth/token"
539
+ }
540
+ },
541
+ facebook: {
542
+ authorizationUrl: "https://www.facebook.com/v16.0/dialog/oauth",
543
+ email: ["email"],
544
+ familyName: ["family_name"],
545
+ fullName: ["name"],
546
+ givenName: ["given_name"],
547
+ isOIDC: true,
548
+ isRefreshable: false,
549
+ picture: ["picture"],
550
+ PKCEMethod: "S256",
551
+ profileRequest: {
552
+ authIn: "query",
553
+ encoding: "application/json",
554
+ method: "GET",
555
+ searchParams: [["fields", "id,name,email,picture"]],
556
+ url: "https://graph.facebook.com/me"
557
+ },
558
+ scopeRequired: false,
559
+ subject: ["sub"],
560
+ subjectBySource: {
561
+ idToken: ["sub"],
562
+ profile: ["id"]
563
+ },
564
+ subjectType: "string",
565
+ tokenRequest: {
566
+ authIn: "body",
567
+ encoding: "application/x-www-form-urlencoded",
568
+ url: "https://graph.facebook.com/v16.0/oauth/access_token"
569
+ }
570
+ },
571
+ figma: {
572
+ authorizationUrl: "https://www.figma.com/oauth",
573
+ email: ["email"],
574
+ isOIDC: false,
575
+ isRefreshable: true,
576
+ picture: ["img_url"],
577
+ PKCEMethod: "S256",
578
+ profileRequest: {
579
+ authIn: "header",
580
+ encoding: "application/json",
581
+ method: "GET",
582
+ url: "https://api.figma.com/v1/me"
583
+ },
584
+ scopeRequired: true,
585
+ subject: ["id"],
586
+ subjectType: "string",
587
+ tokenRequest: {
588
+ authIn: "body",
589
+ encoding: "application/x-www-form-urlencoded",
590
+ url: "https://api.figma.com/v1/oauth/token"
591
+ }
592
+ },
593
+ gitea: {
594
+ authorizationUrl: (config) => `${config.baseURL}/login/oauth/authorize`,
595
+ isOIDC: true,
596
+ isRefreshable: true,
597
+ PKCEMethod: "S256",
598
+ profileRequest: {
599
+ authIn: "header",
600
+ encoding: "application/json",
601
+ method: "GET",
602
+ url: (config) => `${config.baseURL}/api/v1/user`
603
+ },
604
+ scopeRequired: false,
605
+ subject: ["id"],
606
+ subjectType: "string",
607
+ tokenRequest: {
608
+ authIn: "body",
609
+ encoding: "application/x-www-form-urlencoded",
610
+ url: (config) => `${config.baseURL}/login/oauth/access_token`
611
+ }
612
+ },
613
+ github: {
614
+ authorizationUrl: "https://github.com/login/oauth/authorize",
615
+ email: ["email"],
616
+ isOIDC: false,
617
+ isRefreshable: false,
618
+ picture: ["avatar_url"],
619
+ profileRequest: {
620
+ authIn: "header",
621
+ encoding: "application/json",
622
+ method: "GET",
623
+ url: "https://api.github.com/user"
624
+ },
625
+ scopeRequired: false,
626
+ subject: ["id"],
627
+ subjectType: "number",
628
+ tokenRequest: {
629
+ authIn: "body",
630
+ encoding: "application/x-www-form-urlencoded",
631
+ url: "https://github.com/login/oauth/access_token"
632
+ }
633
+ },
634
+ gitlab: {
635
+ authorizationUrl: (config) => `${config.baseURL}/oauth/authorize`,
636
+ email: ["email"],
637
+ fullName: ["name"],
638
+ isOIDC: true,
639
+ isRefreshable: true,
640
+ picture: ["picture"],
641
+ PKCEMethod: "S256",
642
+ profileRequest: {
643
+ authIn: "header",
644
+ encoding: "application/json",
645
+ method: "GET",
646
+ url: "https://gitlab.com/api/v4/user"
647
+ },
648
+ revocationRequest: {
649
+ authIn: "body",
650
+ encoding: "application/json",
651
+ tokenParamName: "token",
652
+ url: (config) => `${config.baseURL}/oauth/revoke`
653
+ },
654
+ scopeRequired: false,
655
+ subject: ["id"],
656
+ subjectType: "string",
657
+ tokenRequest: {
658
+ authIn: "body",
659
+ encoding: "application/x-www-form-urlencoded",
660
+ url: (config) => `${config.baseURL}/oauth/token`
661
+ }
662
+ },
663
+ google: {
664
+ authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
665
+ email: ["email"],
666
+ familyName: ["family_name"],
667
+ fullName: ["name"],
668
+ givenName: ["given_name"],
669
+ isOIDC: true,
670
+ isRefreshable: true,
671
+ picture: ["picture"],
672
+ PKCEMethod: "S256",
673
+ profileRequest: {
674
+ authIn: "header",
675
+ encoding: "application/json",
676
+ method: "GET",
677
+ url: "https://openidconnect.googleapis.com/v1/userinfo"
678
+ },
679
+ revocationRequest: {
680
+ authIn: "body",
681
+ encoding: "application/json",
682
+ tokenParamName: "token",
683
+ url: "https://oauth2.googleapis.com/revoke"
684
+ },
685
+ scopeRequired: true,
686
+ subject: ["sub"],
687
+ subjectBySource: {
688
+ idToken: ["sub"],
689
+ profile: ["sub"]
690
+ },
691
+ subjectType: "string",
692
+ tokenRequest: {
693
+ authIn: "body",
694
+ encoding: "application/x-www-form-urlencoded",
695
+ url: "https://oauth2.googleapis.com/token"
696
+ }
697
+ },
698
+ intuit: {
699
+ authorizationUrl: "https://appcenter.intuit.com/connect/oauth2",
700
+ isOIDC: true,
701
+ isRefreshable: true,
702
+ profileRequest: {
703
+ authIn: "header",
704
+ encoding: "application/json",
705
+ method: "GET",
706
+ url: (config) => config.environment === "production" ? "https://accounts.platform.intuit.com/v1/openid_connect/userinfo" : "https://sandbox-accounts.platform.intuit.com/v1/openid_connect/userinfo"
707
+ },
708
+ revocationRequest: {
709
+ authIn: "body",
710
+ encoding: "application/json",
711
+ headers: (config) => ({
712
+ Authorization: `Basic ${encodeBase64(`${config.clientId}:${config.clientSecret}`)}`
713
+ }),
714
+ tokenParamName: "token",
715
+ url: "https://developer.api.intuit.com/v2/oauth2/tokens/revoke"
716
+ },
717
+ scopeRequired: true,
718
+ subject: ["id"],
719
+ subjectType: "string",
720
+ tokenRequest: {
721
+ authIn: "body",
722
+ encoding: "application/x-www-form-urlencoded",
723
+ url: "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer"
724
+ }
725
+ },
726
+ kakao: {
727
+ authorizationUrl: "https://kauth.kakao.com/oauth/authorize",
728
+ isOIDC: true,
729
+ isRefreshable: true,
730
+ picture: ["picture"],
731
+ PKCEMethod: "S256",
732
+ profileRequest: {
733
+ authIn: "header",
734
+ encoding: "application/json",
735
+ method: "GET",
736
+ url: "https://kapi.kakao.com/v2/user/me"
737
+ },
738
+ scopeRequired: false,
739
+ subject: ["id"],
740
+ subjectType: "string",
741
+ tokenRequest: {
742
+ authIn: "body",
743
+ encoding: "application/x-www-form-urlencoded",
744
+ url: "https://kauth.kakao.com/oauth/token"
745
+ }
746
+ },
747
+ keycloak: {
748
+ authorizationUrl: (config) => `${config.realmURL}/protocol/openid-connect/auth`,
749
+ isOIDC: true,
750
+ isRefreshable: true,
751
+ PKCEMethod: "S256",
752
+ profileRequest: {
753
+ authIn: "header",
754
+ encoding: "application/json",
755
+ method: "GET",
756
+ url: "https://api.kick.com/v1/user"
757
+ },
758
+ revocationRequest: {
759
+ authIn: "body",
760
+ encoding: "application/json",
761
+ tokenParamName: "token",
762
+ url: (config) => `${config.realmURL}/protocol/openid-connect/revoke`
763
+ },
764
+ scopeRequired: false,
765
+ subject: ["id"],
766
+ subjectType: "string",
767
+ tokenRequest: {
768
+ authIn: "body",
769
+ encoding: "application/x-www-form-urlencoded",
770
+ url: (config) => `${config.realmURL}/protocol/openid-connect/token`
771
+ }
772
+ },
773
+ kick: {
774
+ authorizationUrl: "https://id.kick.com/oauth/authorize",
775
+ email: ["data", "email"],
776
+ isOIDC: false,
777
+ isRefreshable: true,
778
+ picture: ["data", "profile_picture"],
779
+ PKCEMethod: "S256",
780
+ profileRequest: {
781
+ authIn: "header",
782
+ encoding: "application/json",
783
+ method: "GET",
784
+ url: "https://api.kick.com/public/v1/users"
785
+ },
786
+ revocationRequest: {
787
+ authIn: "body",
788
+ encoding: "application/json",
789
+ tokenParamName: "token",
790
+ url: "https://id.kick.com/oauth/revoke"
791
+ },
792
+ scopeRequired: true,
793
+ subject: ["data", "user_id"],
794
+ subjectType: "number",
795
+ tokenRequest: {
796
+ authIn: "body",
797
+ encoding: "application/x-www-form-urlencoded",
798
+ url: "https://id.kick.com/oauth/token"
799
+ }
800
+ },
801
+ lichess: {
802
+ authorizationUrl: "https://lichess.org/oauth/authorize",
803
+ isOIDC: false,
804
+ isRefreshable: false,
805
+ PKCEMethod: "S256",
806
+ profileRequest: {
807
+ authIn: "header",
808
+ encoding: "application/json",
809
+ method: "GET",
810
+ url: "https://lichess.org/api/account"
811
+ },
812
+ scopeRequired: false,
813
+ subject: ["id"],
814
+ subjectType: "string",
815
+ tokenRequest: {
816
+ authIn: "body",
817
+ encoding: "application/x-www-form-urlencoded",
818
+ url: "https://lichess.org/api/token"
819
+ }
820
+ },
821
+ line: {
822
+ authorizationUrl: "https://access.line.me/oauth2/v2.1/authorize",
823
+ isOIDC: true,
824
+ isRefreshable: true,
825
+ PKCEMethod: "S256",
826
+ profileRequest: {
827
+ authIn: "header",
828
+ encoding: "application/json",
829
+ method: "GET",
830
+ url: "https://api.line.me/v2/profile"
831
+ },
832
+ scopeRequired: true,
833
+ subject: ["id"],
834
+ subjectType: "string",
835
+ tokenRequest: {
836
+ authIn: "body",
837
+ encoding: "application/x-www-form-urlencoded",
838
+ url: "https://api.line.me/oauth2/v2.1/token"
839
+ }
840
+ },
841
+ linear: {
842
+ authorizationUrl: "https://linear.app/oauth/authorize",
843
+ isOIDC: false,
844
+ isRefreshable: false,
845
+ profileRequest: {
846
+ authIn: "header",
847
+ body: {
848
+ query: `query { viewer { id name } }`
849
+ },
850
+ encoding: "application/json",
851
+ headers: {
852
+ Accept: "application/json",
853
+ "Content-Type": "application/json"
854
+ },
855
+ method: "POST",
856
+ url: "https://api.linear.app/graphql"
857
+ },
858
+ revocationRequest: {
859
+ authIn: "header",
860
+ encoding: "application/json",
861
+ url: "https://api.linear.app/oauth/revoke"
862
+ },
863
+ scopeRequired: false,
864
+ subject: ["data", "viewer", "id"],
865
+ subjectType: "string",
866
+ tokenRequest: {
867
+ authIn: "body",
868
+ encoding: "application/x-www-form-urlencoded",
869
+ url: "https://api.linear.app/oauth/token"
870
+ }
871
+ },
872
+ linkedin: {
873
+ authorizationUrl: "https://www.linkedin.com/oauth/v2/authorization",
874
+ isOIDC: true,
875
+ isRefreshable: true,
876
+ PKCEMethod: "S256",
877
+ profileRequest: {
878
+ authIn: "header",
879
+ encoding: "application/json",
880
+ method: "GET",
881
+ url: "https://api.linkedin.com/v2/me"
882
+ },
883
+ scopeRequired: true,
884
+ subject: ["id"],
885
+ subjectType: "string",
886
+ tokenRequest: {
887
+ authIn: "body",
888
+ encoding: "application/x-www-form-urlencoded",
889
+ url: "https://www.linkedin.com/oauth/v2/accessToken"
890
+ }
891
+ },
892
+ mastodon: {
893
+ authorizationUrl: (config) => `${config.baseURL}/oauth/authorize`,
894
+ isOIDC: false,
895
+ isRefreshable: false,
896
+ picture: ["avatar"],
897
+ PKCEMethod: "S256",
898
+ profileRequest: {
899
+ authIn: "header",
900
+ encoding: "application/json",
901
+ method: "GET",
902
+ url: (config) => `${config.baseURL}/api/v1/accounts/verify_credentials`
903
+ },
904
+ revocationRequest: {
905
+ authIn: "body",
906
+ encoding: "application/json",
907
+ tokenParamName: "token",
908
+ url: (config) => `${config.baseURL}/oauth/revoke`
909
+ },
910
+ scopeRequired: false,
911
+ subject: ["id"],
912
+ subjectType: "string",
913
+ tokenRequest: {
914
+ authIn: "body",
915
+ encoding: "application/x-www-form-urlencoded",
916
+ url: (config) => `${config.baseURL}/oauth/token`
917
+ }
918
+ },
919
+ mercadolibre: {
920
+ authorizationUrl: "https://auth.mercadolibre.com/authorization",
921
+ isOIDC: false,
922
+ isRefreshable: true,
923
+ PKCEMethod: "S256",
924
+ profileRequest: {
925
+ authIn: "header",
926
+ encoding: "application/json",
927
+ method: "GET",
928
+ url: "https://api.mercadolibre.com/users/me"
929
+ },
930
+ scopeRequired: false,
931
+ subject: ["id"],
932
+ subjectType: "number",
933
+ tokenRequest: {
934
+ authIn: "body",
935
+ encoding: "application/x-www-form-urlencoded",
936
+ url: "https://api.mercadolibre.com/oauth/token"
937
+ }
938
+ },
939
+ mercadopago: {
940
+ authorizationUrl: "https://auth.mercadopago.com/authorization",
941
+ isOIDC: false,
942
+ isRefreshable: true,
943
+ profileRequest: {
944
+ authIn: "header",
945
+ encoding: "application/json",
946
+ method: "GET",
947
+ url: "https://api.mercadopago.com/v1/users/me"
948
+ },
949
+ scopeRequired: false,
950
+ subject: ["id"],
951
+ subjectType: "number",
952
+ tokenRequest: {
953
+ authIn: "body",
954
+ encoding: "application/x-www-form-urlencoded",
955
+ url: "https://api.mercadopago.com/oauth/token"
956
+ }
957
+ },
958
+ microsoftentraid: {
959
+ authorizationUrl: (config) => `https://${config.tenantId}.b2clogin.com/${config.tenantId}/oauth2/v2.0/authorize`,
960
+ isOIDC: true,
961
+ isRefreshable: true,
962
+ PKCEMethod: "S256",
963
+ profileRequest: {
964
+ authIn: "header",
965
+ encoding: "application/json",
966
+ method: "GET",
967
+ url: (config) => `https://${config.tenantId}.b2clogin.com/${config.tenantId}/openid/userinfo`
968
+ },
969
+ scopeRequired: false,
970
+ subject: ["id"],
971
+ subjectType: "string",
972
+ tokenRequest: {
973
+ authIn: "body",
974
+ encoding: "application/x-www-form-urlencoded",
975
+ url: (config) => `https://${config.tenantId}.b2clogin.com/${config.tenantId}/oauth2/v2.0/token`
976
+ }
977
+ },
978
+ myanimelist: {
979
+ authorizationUrl: "https://myanimelist.net/v1/oauth2/authorize",
980
+ isOIDC: false,
981
+ isRefreshable: true,
982
+ PKCEMethod: "plain",
983
+ profileRequest: {
984
+ authIn: "header",
985
+ encoding: "application/json",
986
+ method: "GET",
987
+ url: "https://api.myanimelist.net/v2/users/@me"
988
+ },
989
+ scopeRequired: false,
990
+ subject: ["id"],
991
+ subjectType: "number",
992
+ tokenRequest: {
993
+ authIn: "body",
994
+ encoding: "application/x-www-form-urlencoded",
995
+ url: "https://myanimelist.net/v1/oauth2/token"
996
+ }
997
+ },
998
+ naver: {
999
+ authorizationUrl: "https://nid.naver.com/oauth2.0/authorize",
1000
+ email: ["response", "email"],
1001
+ fullName: ["response", "name"],
1002
+ isOIDC: false,
1003
+ isRefreshable: true,
1004
+ picture: ["response", "profile_image"],
1005
+ profileRequest: {
1006
+ authIn: "header",
1007
+ encoding: "application/json",
1008
+ method: "GET",
1009
+ url: "https://openapi.naver.com/v1/nid/me"
1010
+ },
1011
+ scopeRequired: false,
1012
+ subject: ["response", "id"],
1013
+ subjectType: "string",
1014
+ tokenRequest: {
1015
+ authIn: "body",
1016
+ encoding: "application/x-www-form-urlencoded",
1017
+ url: "https://nid.naver.com/oauth2.0/token"
1018
+ }
1019
+ },
1020
+ notion: {
1021
+ authorizationUrl: "https://api.notion.com/v1/oauth/authorize",
1022
+ email: ["bot", "owner", "user", "person", "email"],
1023
+ isOIDC: false,
1024
+ isRefreshable: false,
1025
+ picture: ["bot", "owner", "user", "avatar_url"],
1026
+ profileRequest: {
1027
+ authIn: "header",
1028
+ encoding: "application/json",
1029
+ headers: {
1030
+ "Notion-Version": "2022-06-28"
1031
+ },
1032
+ method: "GET",
1033
+ url: "https://api.notion.com/v1/users/me"
1034
+ },
1035
+ scopeRequired: false,
1036
+ subject: ["bot", "owner", "user", "id"],
1037
+ subjectType: "string",
1038
+ tokenRequest: {
1039
+ authIn: "header",
1040
+ encoding: "application/json",
1041
+ url: "https://api.notion.com/v1/oauth/token"
1042
+ }
1043
+ },
1044
+ okta: {
1045
+ authorizationUrl: (config) => `https://${config.domain}/oauth2/default/v1/authorize`,
1046
+ isOIDC: true,
1047
+ isRefreshable: true,
1048
+ PKCEMethod: "S256",
1049
+ profileRequest: {
1050
+ authIn: "header",
1051
+ encoding: "application/json",
1052
+ method: "GET",
1053
+ url: (config) => `https://${config.domain}/oauth2/default/v1/userinfo`
1054
+ },
1055
+ revocationRequest: {
1056
+ authIn: "body",
1057
+ encoding: "application/json",
1058
+ tokenParamName: "token",
1059
+ url: (config) => `https://${config.domain}/oauth2/default/v1/revoke`
1060
+ },
1061
+ scopeRequired: true,
1062
+ subject: ["id"],
1063
+ subjectType: "string",
1064
+ tokenRequest: {
1065
+ authIn: "body",
1066
+ encoding: "application/x-www-form-urlencoded",
1067
+ url: (config) => `https://${config.domain}/oauth2/default/v1/token`
1068
+ }
1069
+ },
1070
+ osu: {
1071
+ authorizationUrl: "https://osu.ppy.sh/oauth/authorize",
1072
+ isOIDC: false,
1073
+ isRefreshable: true,
1074
+ picture: ["avatar_url"],
1075
+ profileRequest: {
1076
+ authIn: "header",
1077
+ encoding: "application/json",
1078
+ method: "GET",
1079
+ url: "https://osu.ppy.sh/api/v2/me"
1080
+ },
1081
+ scopeRequired: false,
1082
+ subject: ["id"],
1083
+ subjectType: "number",
1084
+ tokenRequest: {
1085
+ authIn: "body",
1086
+ encoding: "application/x-www-form-urlencoded",
1087
+ url: "https://osu.ppy.sh/oauth/token"
1088
+ }
1089
+ },
1090
+ patreon: {
1091
+ authorizationUrl: "https://www.patreon.com/oauth2/authorize",
1092
+ isOIDC: false,
1093
+ isRefreshable: true,
1094
+ profileRequest: {
1095
+ authIn: "header",
1096
+ encoding: "application/json",
1097
+ method: "GET",
1098
+ url: "https://www.patreon.com/api/oauth2/v2/identity"
1099
+ },
1100
+ scopeRequired: false,
1101
+ subject: ["data", "id"],
1102
+ subjectType: "string",
1103
+ tokenRequest: {
1104
+ authIn: "body",
1105
+ encoding: "application/x-www-form-urlencoded",
1106
+ url: "https://www.patreon.com/api/oauth2/token"
1107
+ }
1108
+ },
1109
+ polar: {
1110
+ authorizationUrl: "https://polar.sh/oauth2/authorize",
1111
+ isOIDC: true,
1112
+ isRefreshable: true,
1113
+ PKCEMethod: "S256",
1114
+ profileRequest: {
1115
+ authIn: "header",
1116
+ encoding: "application/json",
1117
+ method: "GET",
1118
+ url: "https://api.polar.sh/v1/oauth2/userinfo"
1119
+ },
1120
+ revocationRequest: {
1121
+ authIn: "body",
1122
+ encoding: "application/json",
1123
+ tokenParamName: "token",
1124
+ url: "https://api.polar.sh/v1/oauth2/revoke"
1125
+ },
1126
+ scopeRequired: true,
1127
+ subject: ["id"],
1128
+ subjectType: "string",
1129
+ tokenRequest: {
1130
+ authIn: "body",
1131
+ encoding: "application/x-www-form-urlencoded",
1132
+ url: "https://api.polar.sh/v1/oauth2/token"
1133
+ }
1134
+ },
1135
+ polaraccesslink: {
1136
+ authorizationUrl: "https://flow.polar.com/oauth2/authorization",
1137
+ isOIDC: false,
1138
+ isRefreshable: false,
1139
+ PKCEMethod: "S256",
1140
+ profileRequest: {
1141
+ authIn: "header",
1142
+ encoding: "application/json",
1143
+ method: "GET",
1144
+ url: "https://www.polaraccesslink.com/v3/users/me"
1145
+ },
1146
+ scopeRequired: false,
1147
+ subject: ["x_user_id"],
1148
+ subjectType: "number",
1149
+ tokenRequest: {
1150
+ authIn: "header",
1151
+ encoding: "application/x-www-form-urlencoded",
1152
+ url: "https://polarremote.com/v2/oauth2/token"
1153
+ }
1154
+ },
1155
+ polarteampro: {
1156
+ authorizationUrl: "https://auth.polar.com/oauth/authorize",
1157
+ isOIDC: false,
1158
+ isRefreshable: true,
1159
+ PKCEMethod: "S256",
1160
+ profileRequest: {
1161
+ authIn: "header",
1162
+ encoding: "application/json",
1163
+ method: "GET",
1164
+ url: "https://www.polaraccesslink.com/v3/users/<USER_ID>"
1165
+ },
1166
+ scopeRequired: false,
1167
+ subject: ["x_user_id"],
1168
+ subjectType: "number",
1169
+ tokenRequest: {
1170
+ authIn: "header",
1171
+ encoding: "application/x-www-form-urlencoded",
1172
+ url: "https://auth.polar.com/oauth/token"
1173
+ }
1174
+ },
1175
+ reddit: {
1176
+ authorizationUrl: "https://www.reddit.com/api/v1/authorize",
1177
+ isOIDC: false,
1178
+ isRefreshable: true,
1179
+ profileRequest: {
1180
+ authIn: "header",
1181
+ encoding: "application/json",
1182
+ method: "GET",
1183
+ url: "https://oauth.reddit.com/api/v1/me"
1184
+ },
1185
+ revocationRequest: {
1186
+ authIn: "header",
1187
+ body: new URLSearchParams({
1188
+ token_type_hint: "refresh_token"
1189
+ }),
1190
+ encoding: "application/json",
1191
+ url: "https://www.reddit.com/api/v1/revoke_token"
1192
+ },
1193
+ scopeRequired: true,
1194
+ subject: ["id"],
1195
+ subjectType: "string",
1196
+ tokenRequest: {
1197
+ authIn: "header",
1198
+ encoding: "application/x-www-form-urlencoded",
1199
+ url: "https://www.reddit.com/api/v1/access_token"
1200
+ }
1201
+ },
1202
+ roblox: {
1203
+ authorizationUrl: "https://apis.roblox.com/oauth/v1/authorize",
1204
+ isOIDC: true,
1205
+ isRefreshable: true,
1206
+ picture: ["picture"],
1207
+ PKCEMethod: "S256",
1208
+ profileRequest: {
1209
+ authIn: "header",
1210
+ encoding: "application/json",
1211
+ method: "GET",
1212
+ url: "https://apis.roblox.com/oauth/v1/userinfo"
1213
+ },
1214
+ scopeRequired: true,
1215
+ subject: ["id"],
1216
+ subjectType: "string",
1217
+ tokenRequest: {
1218
+ authIn: "body",
1219
+ encoding: "application/x-www-form-urlencoded",
1220
+ url: "https://apis.roblox.com/oauth/v1/token"
1221
+ }
1222
+ },
1223
+ salesforce: {
1224
+ authorizationUrl: "https://login.salesforce.com/services/oauth2/authorize",
1225
+ isOIDC: true,
1226
+ isRefreshable: true,
1227
+ PKCEMethod: "S256",
1228
+ profileRequest: {
1229
+ authIn: "header",
1230
+ encoding: "application/json",
1231
+ method: "GET",
1232
+ url: "https://login.salesforce.com/services/oauth2/userinfo"
1233
+ },
1234
+ revocationRequest: {
1235
+ authIn: "header",
1236
+ encoding: "application/json",
1237
+ url: "https://login.salesforce.com/services/oauth2/revoke"
1238
+ },
1239
+ scopeRequired: false,
1240
+ subject: ["id"],
1241
+ subjectType: "string",
1242
+ tokenRequest: {
1243
+ authIn: "body",
1244
+ encoding: "application/x-www-form-urlencoded",
1245
+ url: "https://login.salesforce.com/services/oauth2/token"
1246
+ }
1247
+ },
1248
+ shikimori: {
1249
+ authorizationUrl: "https://shikimori.org/oauth/authorize",
1250
+ isOIDC: false,
1251
+ isRefreshable: true,
1252
+ profileRequest: {
1253
+ authIn: "header",
1254
+ encoding: "application/json",
1255
+ method: "GET",
1256
+ url: "https://shikimori.one/api/users/whoami"
1257
+ },
1258
+ scopeRequired: false,
1259
+ subject: ["id"],
1260
+ subjectType: "number",
1261
+ tokenRequest: {
1262
+ authIn: "body",
1263
+ encoding: "application/x-www-form-urlencoded",
1264
+ url: "https://shikimori.org/oauth/token"
1265
+ }
1266
+ },
1267
+ slack: {
1268
+ authorizationUrl: "https://slack.com/openid/connect/authorize",
1269
+ isOIDC: true,
1270
+ isRefreshable: true,
1271
+ profileRequest: {
1272
+ authIn: "query",
1273
+ encoding: "application/json",
1274
+ method: "GET",
1275
+ url: "https://slack.com/api/users.identity"
1276
+ },
1277
+ revocationRequest: {
1278
+ authIn: "body",
1279
+ encoding: "application/json",
1280
+ tokenParamName: "token",
1281
+ url: "https://slack.com/api/auth.revoke"
1282
+ },
1283
+ scopeRequired: true,
1284
+ subject: ["id"],
1285
+ subjectType: "string",
1286
+ tokenRequest: {
1287
+ authIn: "body",
1288
+ encoding: "application/x-www-form-urlencoded",
1289
+ url: "https://slack.com/api/openid.connect.token"
1290
+ }
1291
+ },
1292
+ spotify: {
1293
+ authorizationUrl: "https://accounts.spotify.com/authorize",
1294
+ isOIDC: false,
1295
+ isRefreshable: true,
1296
+ PKCEMethod: "S256",
1297
+ profileRequest: {
1298
+ authIn: "header",
1299
+ encoding: "application/json",
1300
+ method: "GET",
1301
+ url: "https://api.spotify.com/v1/me"
1302
+ },
1303
+ scopeRequired: false,
1304
+ subject: ["id"],
1305
+ subjectType: "string",
1306
+ tokenRequest: {
1307
+ authIn: "body",
1308
+ encoding: "application/x-www-form-urlencoded",
1309
+ url: "https://accounts.spotify.com/api/token"
1310
+ }
1311
+ },
1312
+ startgg: {
1313
+ authorizationUrl: "https://start.gg/oauth/authorize",
1314
+ email: ["data", "currentUser", "email"],
1315
+ isOIDC: false,
1316
+ isRefreshable: true,
1317
+ profileRequest: {
1318
+ authIn: "header",
1319
+ body: {
1320
+ query: `query { currentUser { id slug email player { gamerTag } } }`
1321
+ },
1322
+ encoding: "application/json",
1323
+ headers: {
1324
+ Accept: "application/json",
1325
+ "Content-Type": "application/json"
1326
+ },
1327
+ method: "POST",
1328
+ url: "https://api.start.gg/gql/alpha"
1329
+ },
1330
+ scopeRequired: false,
1331
+ subject: ["data", "currentUser", "id"],
1332
+ subjectType: "number",
1333
+ tokenRequest: {
1334
+ authIn: "body",
1335
+ encoding: "application/x-www-form-urlencoded",
1336
+ url: "https://api.start.gg/oauth/access_token"
1337
+ }
1338
+ },
1339
+ strava: {
1340
+ authorizationUrl: "https://www.strava.com/oauth/authorize",
1341
+ familyName: ["lastname"],
1342
+ givenName: ["firstname"],
1343
+ isOIDC: false,
1344
+ isRefreshable: true,
1345
+ picture: ["profile"],
1346
+ PKCEMethod: "S256",
1347
+ profileRequest: {
1348
+ authIn: "header",
1349
+ encoding: "application/json",
1350
+ method: "GET",
1351
+ url: "https://www.strava.com/api/v3/athlete"
1352
+ },
1353
+ revocationRequest: {
1354
+ authIn: "query",
1355
+ body: new URLSearchParams({
1356
+ token_type_hint: "access_token"
1357
+ }),
1358
+ encoding: "application/json",
1359
+ tokenParamName: "access_token",
1360
+ url: "https://www.strava.com/oauth/deauthorize"
1361
+ },
1362
+ scopeRequired: false,
1363
+ subject: ["id"],
1364
+ subjectType: "number",
1365
+ tokenRequest: {
1366
+ authIn: "body",
1367
+ encoding: "application/x-www-form-urlencoded",
1368
+ url: "https://www.strava.com/oauth/token"
1369
+ }
1370
+ },
1371
+ synology: {
1372
+ authorizationUrl: (config) => `${config.baseURL}/webman/sso/SSOOauth.cgi?client_id=${config.clientId}&response_type=code&redirect_uri=${config.redirectUri}`,
1373
+ isOIDC: false,
1374
+ isRefreshable: false,
1375
+ profileRequest: {
1376
+ authIn: "header",
1377
+ encoding: "application/json",
1378
+ method: "GET",
1379
+ url: (config) => `${config.baseURL}/webman/sso/SSOUserInfo.cgi?client_id=${config.clientId}&access_token=${config.accessToken}`
1380
+ },
1381
+ scopeRequired: false,
1382
+ subject: ["data", "id"],
1383
+ subjectType: "number",
1384
+ tokenRequest: {
1385
+ authIn: "body",
1386
+ encoding: "application/x-www-form-urlencoded",
1387
+ url: (config) => `${config.baseURL}/webman/sso/SSOAccessToken.cgi?client_id=${config.clientId}&client_secret=${config.clientSecret}`
1388
+ }
1389
+ },
1390
+ tiktok: {
1391
+ authorizationUrl: "https://www.tiktok.com/v2/auth/authorize",
1392
+ createAuthorizationURLSearchParams: (config) => ({
1393
+ client_key: config.clientId
1394
+ }),
1395
+ isOIDC: false,
1396
+ isRefreshable: true,
1397
+ PKCEMethod: "S256",
1398
+ profileRequest: {
1399
+ authIn: "query",
1400
+ encoding: "application/json",
1401
+ method: "GET",
1402
+ url: "https://open.douyin.com/oauth/userinfo"
1403
+ },
1404
+ revocationRequest: {
1405
+ authIn: "body",
1406
+ encoding: "application/json",
1407
+ tokenParamName: "token",
1408
+ url: "https://open.tiktokapis.com/v2/oauth/revoke/"
1409
+ },
1410
+ scopeRequired: false,
1411
+ subject: ["data", "open_id"],
1412
+ subjectType: "string",
1413
+ tokenRequest: {
1414
+ authIn: "body",
1415
+ encoding: "application/x-www-form-urlencoded",
1416
+ url: "https://open.tiktokapis.com/v2/oauth/token/"
1417
+ }
1418
+ },
1419
+ tiltify: {
1420
+ authorizationUrl: "https://v5api.tiltify.com/oauth/authorize",
1421
+ isOIDC: false,
1422
+ isRefreshable: true,
1423
+ profileRequest: {
1424
+ authIn: "header",
1425
+ encoding: "application/json",
1426
+ method: "GET",
1427
+ url: "https://v5api.tiltify.com/api/public/current-user"
1428
+ },
1429
+ scopeRequired: false,
1430
+ subject: ["data", "id"],
1431
+ subjectType: "string",
1432
+ tokenRequest: {
1433
+ authIn: "body",
1434
+ encoding: "application/x-www-form-urlencoded",
1435
+ url: "https://v5api.tiltify.com/oauth/token"
1436
+ }
1437
+ },
1438
+ tumblr: {
1439
+ authorizationUrl: "https://www.tumblr.com/oauth2/authorize",
1440
+ isOIDC: false,
1441
+ isRefreshable: true,
1442
+ profileRequest: {
1443
+ authIn: "header",
1444
+ encoding: "application/json",
1445
+ method: "GET",
1446
+ url: "https://api.tumblr.com/v2/user/info"
1447
+ },
1448
+ scopeRequired: false,
1449
+ subject: ["response", "user", "name"],
1450
+ subjectType: "string",
1451
+ tokenRequest: {
1452
+ authIn: "body",
1453
+ encoding: "application/x-www-form-urlencoded",
1454
+ url: "https://api.tumblr.com/v2/oauth2/token"
1455
+ }
1456
+ },
1457
+ twitch: {
1458
+ authorizationUrl: "https://id.twitch.tv/oauth2/authorize",
1459
+ isOIDC: true,
1460
+ isRefreshable: true,
1461
+ profileRequest: {
1462
+ authIn: "header",
1463
+ encoding: "application/json",
1464
+ headers: (config) => ({
1465
+ "Client-Id": config.clientId
1466
+ }),
1467
+ method: "GET",
1468
+ url: "https://api.twitch.tv/helix/users"
1469
+ },
1470
+ revocationRequest: {
1471
+ authIn: "query",
1472
+ encoding: "application/json",
1473
+ headers: (config) => ({
1474
+ "Client-Id": config.clientId
1475
+ }),
1476
+ tokenParamName: "token",
1477
+ url: "https://id.twitch.tv/oauth2/revoke"
1478
+ },
1479
+ scopeRequired: false,
1480
+ subject: ["id"],
1481
+ subjectType: "string",
1482
+ tokenRequest: {
1483
+ authIn: "body",
1484
+ encoding: "application/x-www-form-urlencoded",
1485
+ url: "https://id.twitch.tv/oauth2/token"
1486
+ }
1487
+ },
1488
+ twitter: {
1489
+ authorizationUrl: "https://twitter.com/i/oauth2/authorize",
1490
+ isOIDC: false,
1491
+ isRefreshable: true,
1492
+ PKCEMethod: "S256",
1493
+ profileRequest: {
1494
+ authIn: "header",
1495
+ encoding: "application/json",
1496
+ method: "GET",
1497
+ url: "https://api.twitter.com/2/users/me"
1498
+ },
1499
+ revocationRequest: {
1500
+ authIn: "header",
1501
+ encoding: "application/json",
1502
+ url: "https://api.twitter.com/2/oauth2/revoke"
1503
+ },
1504
+ scopeRequired: false,
1505
+ subject: ["data", "id"],
1506
+ subjectType: "number",
1507
+ tokenRequest: {
1508
+ authIn: "body",
1509
+ encoding: "application/x-www-form-urlencoded",
1510
+ url: "https://api.twitter.com/2/oauth2/token"
1511
+ }
1512
+ },
1513
+ vk: {
1514
+ authorizationUrl: "https://oauth.vk.com/authorize",
1515
+ isOIDC: false,
1516
+ isRefreshable: false,
1517
+ profileRequest: {
1518
+ authIn: "query",
1519
+ encoding: "application/json",
1520
+ method: "GET",
1521
+ url: "https://api.vk.com/method/users.get"
1522
+ },
1523
+ scopeRequired: false,
1524
+ subject: ["response", "0", "id"],
1525
+ subjectType: "number",
1526
+ tokenRequest: {
1527
+ authIn: "body",
1528
+ encoding: "application/x-www-form-urlencoded",
1529
+ url: "https://oauth.vk.com/access_token"
1530
+ }
1531
+ },
1532
+ withings: {
1533
+ authorizationUrl: "https://account.withings.com/oauth2_user/authorize2",
1534
+ isOIDC: false,
1535
+ isRefreshable: true,
1536
+ profileRequest: {
1537
+ authIn: "header",
1538
+ body: async (config) => {
1539
+ const props = await getWithingsProps(config);
1540
+ if (props === undefined)
1541
+ throw new Error("Failed to get Withings search properties");
1542
+ const { nonce, hashedSignature } = props;
1543
+ return [
1544
+ ["action", "getuser"],
1545
+ ["nonce", nonce],
1546
+ ["client_id", config.clientId],
1547
+ ["signature", hashedSignature]
1548
+ ];
1549
+ },
1550
+ encoding: "application/x-www-form-urlencoded",
1551
+ method: "POST",
1552
+ url: "https://wbsapi.withings.net/v2/oauth2"
1553
+ },
1554
+ refreshAccessTokenBody: {
1555
+ action: "requesttoken"
1556
+ },
1557
+ revocationRequest: {
1558
+ authIn: "header",
1559
+ body: async (config) => {
1560
+ const props = await getWithingsProps(config);
1561
+ if (!props)
1562
+ throw new Error("Failed to get Withings props");
1563
+ const { nonce, hashedSignature } = props;
1564
+ return [
1565
+ ["action", "revoke"],
1566
+ ["client_id", config.clientId],
1567
+ ["nonce", nonce],
1568
+ ["signature", hashedSignature]
1569
+ ];
1570
+ },
1571
+ encoding: "application/x-www-form-urlencoded",
1572
+ method: "POST",
1573
+ url: "https://wbsapi.withings.net/v2/oauth2"
1574
+ },
1575
+ scopeRequired: true,
1576
+ subject: ["userid"],
1577
+ subjectType: "string",
1578
+ tokenRequest: {
1579
+ authIn: "body",
1580
+ encoding: "application/x-www-form-urlencoded",
1581
+ url: "https://wbsapi.withings.net/v2/oauth2"
1582
+ },
1583
+ validateAuthorizationCodeBody: {
1584
+ action: "requesttoken"
1585
+ }
1586
+ },
1587
+ workos: {
1588
+ authorizationUrl: (config) => `https://${config.domain}/oauth2/authorize`,
1589
+ createAuthorizationURLSearchParams: () => {
1590
+ const nonce = crypto.randomUUID();
1591
+ return {
1592
+ nonce
1593
+ };
1594
+ },
1595
+ email: ["email"],
1596
+ familyName: ["family_name"],
1597
+ fullName: ["name"],
1598
+ givenName: ["given_name"],
1599
+ isOIDC: true,
1600
+ isRefreshable: true,
1601
+ PKCEMethod: "S256",
1602
+ profileRequest: {
1603
+ authIn: "header",
1604
+ encoding: "application/json",
1605
+ method: "POST",
1606
+ url: (config) => `https://${config.domain}/oauth2/userinfo`
1607
+ },
1608
+ scopeRequired: false,
1609
+ subject: ["id"],
1610
+ subjectType: "string",
1611
+ tokenRequest: {
1612
+ authIn: "body",
1613
+ encoding: "application/x-www-form-urlencoded",
1614
+ url: (config) => `https://${config.domain}/oauth2/token`
1615
+ }
1616
+ },
1617
+ yahoo: {
1618
+ authorizationUrl: "https://api.login.yahoo.com/oauth2/request_auth",
1619
+ isOIDC: true,
1620
+ isRefreshable: true,
1621
+ PKCEMethod: "S256",
1622
+ profileRequest: {
1623
+ authIn: "header",
1624
+ encoding: "application/json",
1625
+ method: "GET",
1626
+ url: "https://api.login.yahoo.com/openid/v1/userinfo"
1627
+ },
1628
+ revocationRequest: {
1629
+ authIn: "header",
1630
+ encoding: "application/json",
1631
+ url: "https://api.login.yahoo.com/oauth2/revoke"
1632
+ },
1633
+ scopeRequired: false,
1634
+ subject: ["id"],
1635
+ subjectType: "string",
1636
+ tokenRequest: {
1637
+ authIn: "body",
1638
+ encoding: "application/x-www-form-urlencoded",
1639
+ url: "https://api.login.yahoo.com/oauth2/get_token"
1640
+ }
1641
+ },
1642
+ yandex: {
1643
+ authorizationUrl: "https://oauth.yandex.com/authorize",
1644
+ createAuthorizationURLSearchParams: {
1645
+ device_id: crypto.randomUUID(),
1646
+ device_name: `${navigator.platform ?? "Unknown"} \u2014 ${(navigator.userAgent.split(")")[0] || "").split("(").pop() || "Unknown"}`
1647
+ },
1648
+ email: ["default_email"],
1649
+ familyName: ["last_name"],
1650
+ fullName: ["real_name"],
1651
+ givenName: ["first_name"],
1652
+ isOIDC: false,
1653
+ isRefreshable: true,
1654
+ PKCEMethod: "S256",
1655
+ profileRequest: {
1656
+ authIn: "header",
1657
+ encoding: "application/json",
1658
+ method: "GET",
1659
+ url: "https://login.yandex.ru/info"
1660
+ },
1661
+ revocationRequest: {
1662
+ authIn: "body",
1663
+ encoding: "application/json",
1664
+ tokenParamName: "access_token",
1665
+ url: "https://oauth.yandex.com/revoke_token"
1666
+ },
1667
+ scopeRequired: false,
1668
+ subject: ["id"],
1669
+ subjectType: "string",
1670
+ tokenRequest: {
1671
+ authIn: "body",
1672
+ encoding: "application/x-www-form-urlencoded",
1673
+ url: "https://oauth.yandex.com/token"
1674
+ }
1675
+ },
1676
+ zoom: {
1677
+ authorizationUrl: "https://zoom.us/oauth/authorize",
1678
+ email: ["email"],
1679
+ familyName: ["last_name"],
1680
+ givenName: ["first_name"],
1681
+ isOIDC: false,
1682
+ isRefreshable: true,
1683
+ picture: ["pic_url"],
1684
+ PKCEMethod: "S256",
1685
+ profileRequest: {
1686
+ authIn: "header",
1687
+ encoding: "application/json",
1688
+ method: "GET",
1689
+ url: "https://api.zoom.us/v2/users/me"
1690
+ },
1691
+ revocationRequest: {
1692
+ authIn: "query",
1693
+ encoding: "application/json",
1694
+ headers: (config) => ({
1695
+ Authorization: `Basic ${btoa(`${config.clientId}:${config.clientSecret}`)}`
1696
+ }),
1697
+ tokenParamName: "token",
1698
+ url: "https://zoom.us/oauth/revoke"
1699
+ },
1700
+ scopeRequired: false,
1701
+ subject: ["id"],
1702
+ subjectType: "string",
1703
+ tokenRequest: {
1704
+ authIn: "body",
1705
+ encoding: "application/x-www-form-urlencoded",
1706
+ url: "https://zoom.us/oauth/token"
1707
+ }
1708
+ }
1709
+ });
1710
+ var isValidProviderOption = (option) => Object.hasOwn(providers, option);
1711
+ var isRefreshableProviderOption = (option) => {
1712
+ if (!isValidProviderOption(option))
1713
+ return false;
1714
+ const provider = providers[option];
1715
+ return provider.isRefreshable;
1716
+ };
1717
+ var isRevocableProviderOption = (option) => {
1718
+ if (!isValidProviderOption(option))
1719
+ return false;
1720
+ const provider = providers[option];
1721
+ return provider.revocationRequest !== undefined;
1722
+ };
1723
+ var isPKCEProviderOption = (option) => {
1724
+ if (!isValidProviderOption(option))
1725
+ return false;
1726
+ const provider = providers[option];
1727
+ return provider.PKCEMethod !== undefined;
1728
+ };
1729
+ var isOIDCProviderOption = (option) => {
1730
+ if (!isValidProviderOption(option))
1731
+ return false;
1732
+ const provider = providers[option];
1733
+ return provider.isOIDC;
1734
+ };
1735
+ var isScopeRequiredProviderOption = (option) => {
1736
+ if (!isValidProviderOption(option))
1737
+ return false;
1738
+ const provider = providers[option];
1739
+ return provider.scopeRequired;
1740
+ };
1741
+ var isRefreshableOAuth2Client = (providerName, client) => isRefreshableProviderOption(providerName);
1742
+ var isRevocableOAuth2Client = (providerName, client) => isRevocableProviderOption(providerName);
1743
+ var hasClientSecret = (credentials) => {
1744
+ if (typeof credentials !== "object" || credentials === null)
1745
+ return false;
1746
+ const secret = Reflect.get(credentials, "clientSecret");
1747
+ return typeof secret === "string";
1748
+ };
1749
+ var isObject = (x) => x !== null && typeof x === "object" && !Array.isArray(x) && Object.prototype.toString.call(x) === "[object Object]";
1750
+ var isExpectedType = (value, kind) => {
1751
+ switch (kind) {
1752
+ case "string":
1753
+ return typeof value === "string";
1754
+ case "number":
1755
+ return typeof value === "number";
1756
+ case "boolean":
1757
+ return typeof value === "boolean";
1758
+ case "object":
1759
+ return typeof value === "object" && value !== null;
1760
+ }
1761
+ };
1762
+ var createOAuth2FetchError = async (response) => {
1763
+ const clone = response.clone();
1764
+ const prefix = `HTTP ${response.status} ${response.statusText} for ${response.url}`;
1765
+ const payload = await response.json().catch(() => null);
1766
+ if (payload && typeof payload === "object" && Object.keys(payload).length) {
1767
+ return new Error(`${prefix}
1768
+ ${JSON.stringify(payload)}`);
1769
+ }
1770
+ const text = await clone.text().catch(() => "");
1771
+ if (text) {
1772
+ return new Error(`${prefix}
1773
+ ${text}`);
1774
+ }
1775
+ return new Error(prefix);
1776
+ };
1777
+ var encodeBase64 = (input) => {
1778
+ let raw;
1779
+ if (typeof input === "string") {
1780
+ raw = input;
1781
+ } else {
1782
+ const bytes = input instanceof Uint8Array ? input : new Uint8Array(input);
1783
+ raw = bytes.reduce((acc, byte) => acc + String.fromCharCode(byte), "");
1784
+ }
1785
+ return btoa(raw);
1786
+ };
1787
+ var decodeBase64 = (input, toUint8Array = false) => {
1788
+ const b64 = input.replace(/-/g, "+").replace(/_/g, "/") + "==".slice(0, (BASE64_BLOCK_SIZE - input.length % BASE64_BLOCK_SIZE) % BASE64_BLOCK_SIZE);
1789
+ const raw = atob(b64);
1790
+ if (!toUint8Array) {
1791
+ return raw;
1792
+ }
1793
+ const bytes = new Uint8Array(raw.length);
1794
+ for (let i = 0;i < raw.length; i++) {
1795
+ bytes[i] = raw.charCodeAt(i);
1796
+ }
1797
+ return bytes;
1798
+ };
1799
+ var hmacSha256 = async (message, secret) => {
1800
+ const encoder = new TextEncoder;
1801
+ const key = await crypto.subtle.importKey("raw", encoder.encode(secret), { hash: "SHA-256", name: "HMAC" }, false, ["sign"]);
1802
+ const sigBuffer = await crypto.subtle.sign("HMAC", key, encoder.encode(message));
1803
+ return Array.from(new Uint8Array(sigBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
1804
+ };
1805
+ var decodeJWT = (tokenString) => {
1806
+ const [headerSegment, payloadSegment, signatureSegment] = tokenString.split(".");
1807
+ if (!headerSegment || !payloadSegment || !signatureSegment) {
1808
+ throw new Error("Invalid JWT format");
1809
+ }
1810
+ const decodedPayload = decodeBase64(payloadSegment);
1811
+ if (typeof decodedPayload !== "string") {
1812
+ throw new Error("Expected JWT payload to be a UTF-8 string");
1813
+ }
1814
+ return JSON.parse(decodedPayload);
1815
+ };
1816
+ var getWithingsProps = async (config) => {
1817
+ const timestamp = Math.floor(Date.now() / 1000);
1818
+ const signature = `getnonce,${config.clientId},${timestamp}`;
1819
+ const hashedSignature = await hmacSha256(signature, config.clientSecret);
1820
+ const nonceUrl = new URL("https://wbsapi.withings.net/v2/signature");
1821
+ nonceUrl.searchParams.set("action", "getnonce");
1822
+ nonceUrl.searchParams.set("client_id", config.clientId);
1823
+ nonceUrl.searchParams.set("timestamp", timestamp.toString());
1824
+ nonceUrl.searchParams.set("signature", hashedSignature);
1825
+ const nonceResponse = await fetch(nonceUrl.toString(), {
1826
+ method: "POST"
1827
+ });
1828
+ const nonceData = await nonceResponse.json();
1829
+ if (nonceData.status === 0) {
1830
+ return {
1831
+ hashedSignature,
1832
+ nonce: nonceData.body.nonce
1833
+ };
1834
+ }
1835
+ return;
1836
+ };
1837
+ var createOAuth2Request = ({
1838
+ url,
1839
+ body,
1840
+ authIn,
1841
+ headers,
1842
+ encoding,
1843
+ clientId,
1844
+ clientSecret
1845
+ }) => {
1846
+ const oauthHeaders = new Headers(headers);
1847
+ oauthHeaders.set("Accept", "application/json");
1848
+ oauthHeaders.set("User-Agent", "citra");
1849
+ if (authIn === "header") {
1850
+ if (!clientSecret) {
1851
+ throw new Error("clientSecret required for header auth");
1852
+ }
1853
+ oauthHeaders.set("Authorization", `Basic ${encodeBase64(`${clientId}:${clientSecret}`)}`);
1854
+ }
1855
+ if (encoding === "application/json") {
1856
+ oauthHeaders.set("Content-Type", "application/json");
1857
+ return new Request(url, {
1858
+ body: JSON.stringify(body),
1859
+ headers: oauthHeaders,
1860
+ method: "POST"
1861
+ });
1862
+ }
1863
+ oauthHeaders.set("Content-Type", "application/x-www-form-urlencoded");
1864
+ const entries = body instanceof URLSearchParams ? Array.from(body.entries()) : Object.entries(body).filter((entry) => typeof entry[1] === "string");
1865
+ const params = new URLSearchParams(entries);
1866
+ if (authIn === "body") {
1867
+ params.set("client_id", clientId);
1868
+ clientSecret && params.set("client_secret", clientSecret);
1869
+ }
1870
+ return new Request(url, {
1871
+ body: params.toString(),
1872
+ headers: oauthHeaders,
1873
+ method: "POST"
1874
+ });
1875
+ };
1876
+ var extractPropFromIdentity = (identity, keys, propType) => {
1877
+ let value = identity;
1878
+ for (const key of keys) {
1879
+ if (Array.isArray(value))
1880
+ value = value[Number(key)];
1881
+ if (!isObject(value)) {
1882
+ throw new Error(`Invalid identity data shape: expected object, got ${typeof value}`);
1883
+ }
1884
+ value = value[key];
1885
+ }
1886
+ if (propType !== undefined && !isExpectedType(value, propType)) {
1887
+ throw new Error(`Invalid identity data shape: expected ${propType}, got ${typeof value}`);
1888
+ }
1889
+ return value;
1890
+ };
1891
+ var getProviderSubjectKeys = (providerConfiguration, source) => providerConfiguration.subjectBySource?.[source] ?? providerConfiguration.subject;
1892
+ var setPropInIdentity = (identity, keys, value) => {
1893
+ if (keys.length === 0) {
1894
+ return identity;
1895
+ }
1896
+ let cursor = identity;
1897
+ for (const key of keys.slice(0, -1)) {
1898
+ const next = cursor[key];
1899
+ if (!isObject(next)) {
1900
+ cursor[key] = {};
1901
+ }
1902
+ cursor = cursor[key];
1903
+ }
1904
+ cursor[keys[keys.length - 1]] = value;
1905
+ return identity;
1906
+ };
1907
+ var normalizeProviderIdentity = ({
1908
+ identity,
1909
+ providerConfiguration,
1910
+ source
1911
+ }) => {
1912
+ const sourceKeys = getProviderSubjectKeys(providerConfiguration, source);
1913
+ const canonicalKeys = providerConfiguration.subject;
1914
+ if (sourceKeys.join(".") === canonicalKeys.join(".")) {
1915
+ return identity;
1916
+ }
1917
+ const subject = extractPropFromIdentity(identity, sourceKeys, providerConfiguration.subjectType);
1918
+ const normalizedIdentity = structuredClone(identity);
1919
+ return setPropInIdentity(normalizedIdentity, canonicalKeys, subject);
1920
+ };
1921
+ var createS256CodeChallenge = async (codeVerifier) => {
1922
+ const data = new TextEncoder().encode(codeVerifier);
1923
+ const hashBuffer = await crypto.subtle.digest("SHA-256", data);
1924
+ return base64Url(hashBuffer);
1925
+ };
1926
+ var createRandomBase64UrlGenerator = (length) => () => {
1927
+ const buffer = crypto.getRandomValues(new Uint8Array(length));
1928
+ return base64Url(buffer);
1929
+ };
1930
+ var generateCodeVerifier = createRandomBase64UrlGenerator(NUM_GENERATOR_BYTES);
1931
+ var generateState = createRandomBase64UrlGenerator(NUM_GENERATOR_BYTES);
1932
+ var base64Url = (input) => encodeBase64(input).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
1933
+ var providerOptions = Object.keys(providers).filter(isValidProviderOption);
1934
+ var refreshableProviderOptions = Object.keys(providers).filter(isRefreshableProviderOption);
1935
+ var oidcProviderOptions = Object.keys(providers).filter(isOIDCProviderOption);
1936
+ var revocableProviderOptions = Object.keys(providers).filter(isRevocableProviderOption);
1937
+ var scopeRequiredProviderOptions = Object.keys(providers).filter(isScopeRequiredProviderOption);
1938
+ var pkceProviderOptions = Object.keys(providers).filter(isPKCEProviderOption);
1939
+ var createOAuth2Client = async (providerName, config) => {
1940
+ const meta = providers[providerName];
1941
+ const isConfigPropertyFunction = (cfgProp) => typeof cfgProp === "function";
1942
+ const resolveConfigProp = async (cfgProp) => {
1943
+ const result = isConfigPropertyFunction(cfgProp) ? cfgProp(config) : cfgProp;
1944
+ return await result;
1945
+ };
1946
+ const authorizationUrl = await resolveConfigProp(meta.authorizationUrl);
1947
+ const tokenUrl = await resolveConfigProp(meta.tokenRequest.url);
1948
+ return {
1949
+ async createAuthorizationUrl(opts) {
1950
+ const { state, scope = [], searchParams = [], codeVerifier } = opts;
1951
+ const url = new URL(authorizationUrl);
1952
+ url.searchParams.set("response_type", "code");
1953
+ url.searchParams.set("client_id", config.clientId);
1954
+ if (config.redirectUri)
1955
+ url.searchParams.set("redirect_uri", config.redirectUri);
1956
+ if (state)
1957
+ url.searchParams.set("state", state);
1958
+ if (scope.length !== 0) {
1959
+ const delimeter = providerName === "withings" ? "," : " ";
1960
+ url.searchParams.set("scope", scope.join(delimeter));
1961
+ }
1962
+ if (meta.PKCEMethod !== undefined) {
1963
+ if (!codeVerifier) {
1964
+ throw new Error("`codeVerifier` is required when PKCE is enabled");
1965
+ }
1966
+ const codeChallenge = meta.PKCEMethod === "S256" ? await createS256CodeChallenge(codeVerifier) : codeVerifier;
1967
+ url.searchParams.set("code_challenge_method", meta.PKCEMethod);
1968
+ url.searchParams.set("code_challenge", codeChallenge);
1969
+ }
1970
+ Object.entries(resolveConfigProp(meta.createAuthorizationURLSearchParams) ?? {}).forEach(([key, value]) => url.searchParams.set(key, value));
1971
+ searchParams.forEach(([key, value]) => url.searchParams.set(key, value));
1972
+ return url;
1973
+ },
1974
+ async fetchUserProfile(accessToken) {
1975
+ const { profileRequest } = meta;
1976
+ const {
1977
+ url,
1978
+ method,
1979
+ authIn,
1980
+ searchParams,
1981
+ body: profileBody,
1982
+ headers,
1983
+ encoding
1984
+ } = profileRequest;
1985
+ const endpoint = new URL(await resolveConfigProp(url));
1986
+ const resolvedBody = await resolveConfigProp(profileBody);
1987
+ new URLSearchParams(await resolveConfigProp(searchParams)).forEach((value, key) => endpoint.searchParams.append(key, value));
1988
+ let headerEntries = [];
1989
+ const rawHeaders = headers ? await resolveConfigProp(headers) : undefined;
1990
+ if (rawHeaders instanceof Headers)
1991
+ headerEntries = Array.from(rawHeaders.entries());
1992
+ else if (Array.isArray(rawHeaders))
1993
+ headerEntries = rawHeaders;
1994
+ else if (rawHeaders && typeof rawHeaders === "object")
1995
+ headerEntries = Object.entries(rawHeaders);
1996
+ const profileHeaders = Object.fromEntries(headerEntries.filter(([, v]) => v !== ""));
1997
+ if (authIn === "header") {
1998
+ profileHeaders.Authorization = `Bearer ${accessToken}`;
1999
+ } else {
2000
+ endpoint.searchParams.append("access_token", accessToken);
2001
+ }
2002
+ const init = { headers: profileHeaders, method };
2003
+ if (method === "POST" && resolvedBody != null) {
2004
+ profileHeaders["Content-Type"] = encoding;
2005
+ init.body = encoding === "application/json" ? JSON.stringify(resolvedBody) : new URLSearchParams(resolvedBody).toString();
2006
+ }
2007
+ const response = await fetch(endpoint.toString(), init);
2008
+ if (!response.ok)
2009
+ throw await createOAuth2FetchError(response);
2010
+ return response.json();
2011
+ },
2012
+ async refreshAccessToken(refreshToken) {
2013
+ const { authIn, encoding } = meta.tokenRequest;
2014
+ const params = new URLSearchParams(meta.refreshAccessTokenBody);
2015
+ params.set("grant_type", "refresh_token");
2016
+ params.set("refresh_token", refreshToken);
2017
+ const { clientId } = config;
2018
+ let clientSecretValue;
2019
+ if (hasClientSecret(config)) {
2020
+ clientSecretValue = config.clientSecret;
2021
+ params.set("client_id", clientId);
2022
+ params.set("client_secret", clientSecretValue);
2023
+ }
2024
+ const request = createOAuth2Request({
2025
+ authIn,
2026
+ body: params,
2027
+ clientId,
2028
+ clientSecret: clientSecretValue,
2029
+ encoding,
2030
+ url: tokenUrl
2031
+ });
2032
+ const response = await fetch(request);
2033
+ if (!response.ok)
2034
+ throw await createOAuth2FetchError(response);
2035
+ return response.json();
2036
+ },
2037
+ async revokeToken(token) {
2038
+ const { revocationRequest } = meta;
2039
+ if (!revocationRequest) {
2040
+ throw new Error("Token revocation not defined for this provider");
2041
+ }
2042
+ const { url, authIn, body, headers, tokenParamName } = revocationRequest;
2043
+ const endpoint = await resolveConfigProp(url);
2044
+ const resolvedBody = await resolveConfigProp(body);
2045
+ const revocationBody = new URLSearchParams(resolvedBody);
2046
+ const revocationHeaders = new Headers(headers && await resolveConfigProp(headers));
2047
+ const { clientId } = config;
2048
+ const clientSecret = hasClientSecret(config) ? config.clientSecret : undefined;
2049
+ let request;
2050
+ if (authIn === "body") {
2051
+ revocationBody.set(tokenParamName, token);
2052
+ revocationBody.set("client_id", clientId);
2053
+ if (clientSecret)
2054
+ revocationBody.set("client_secret", clientSecret);
2055
+ request = createOAuth2Request({
2056
+ authIn: "body",
2057
+ body: revocationBody,
2058
+ clientId,
2059
+ clientSecret,
2060
+ encoding: "application/x-www-form-urlencoded",
2061
+ headers: revocationHeaders,
2062
+ url: endpoint.toString()
2063
+ });
2064
+ } else if (authIn === "header") {
2065
+ revocationHeaders.set("Authorization", `Bearer ${token}`);
2066
+ request = createOAuth2Request({
2067
+ authIn: "header",
2068
+ body: revocationBody,
2069
+ clientId,
2070
+ clientSecret,
2071
+ encoding: "application/x-www-form-urlencoded",
2072
+ headers: revocationHeaders,
2073
+ url: endpoint.toString()
2074
+ });
2075
+ } else {
2076
+ request = createOAuth2Request({
2077
+ authIn: "query",
2078
+ body: revocationBody,
2079
+ clientId,
2080
+ clientSecret,
2081
+ encoding: "application/x-www-form-urlencoded",
2082
+ headers: revocationHeaders,
2083
+ url: `${endpoint.toString()}?${tokenParamName}=${token}`
2084
+ });
2085
+ }
2086
+ const response = await fetch(request);
2087
+ if (!response.ok)
2088
+ throw await createOAuth2FetchError(response);
2089
+ },
2090
+ async validateAuthorizationCode(opts) {
2091
+ const { code, codeVerifier } = opts;
2092
+ const { authIn, encoding } = meta.tokenRequest;
2093
+ const bodyObj = {};
2094
+ for (const key in meta.validateAuthorizationCodeBody ?? {}) {
2095
+ const value = meta.validateAuthorizationCodeBody[key];
2096
+ if (typeof value === "string")
2097
+ bodyObj[key] = value;
2098
+ }
2099
+ bodyObj.grant_type = "authorization_code";
2100
+ bodyObj.code = code;
2101
+ if (config.redirectUri)
2102
+ bodyObj.redirect_uri = config.redirectUri;
2103
+ if (meta.PKCEMethod !== undefined) {
2104
+ if (!codeVerifier) {
2105
+ throw new Error("codeVerifier required when PKCE is enabled");
2106
+ }
2107
+ bodyObj.code_verifier = codeVerifier;
2108
+ }
2109
+ const payload = encoding === "application/json" ? bodyObj : new URLSearchParams(bodyObj);
2110
+ const request = createOAuth2Request({
2111
+ authIn,
2112
+ body: payload,
2113
+ clientId: config.clientId,
2114
+ clientSecret: hasClientSecret(config) ? config.clientSecret : undefined,
2115
+ encoding,
2116
+ url: tokenUrl
2117
+ });
2118
+ const response = await fetch(request);
2119
+ if (!response.ok)
2120
+ throw await createOAuth2FetchError(response);
2121
+ return response.json();
2122
+ }
2123
+ };
2124
+ };
2125
+
2126
+ // src/ui/renderers.ts
2127
+ var escapeHtml = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;");
2128
+ var defaultAuthorizationHref = (provider, client) => client ? `/oauth2/${provider}/authorization?client=${client}` : `/oauth2/${provider}/authorization`;
2129
+ var resolveAuthHtmxRenderers = (config) => {
2130
+ const { connectorTargets, featuredLoginProviders, providerData } = config;
2131
+ const authorizationHref = config.authorizationHref ?? defaultAuthorizationHref;
2132
+ const overrides = config.render ?? {};
2133
+ const providerLabel = (key) => isValidProviderOption(key) ? providerData[key]?.name ?? key : key;
2134
+ const providerLogo = (key) => isValidProviderOption(key) ? providerData[key]?.logoUrl ?? "" : "";
2135
+ const account = (user) => {
2136
+ const fullName = [user.first_name, user.last_name].filter((part) => typeof part === "string" && part.length > 0).join(" ");
2137
+ return `<div class="grid-2">
2138
+ <div class="card"><h2 class="card__title">Canonical account</h2><p class="muted">Absolute Auth keeps one canonical user and links every OAuth identity to it. Conflicting identities raise a merge request.</p></div>
2139
+ <div class="card text-left"><h2 class="card__title">Profile fields</h2>
2140
+ <div class="spread"><span class="muted">Subject</span><span>${escapeHtml(user.sub)}</span></div>
2141
+ <div class="spread"><span class="muted">Name</span><span>${escapeHtml(fullName || "\u2014")}</span></div>
2142
+ <div class="spread"><span class="muted">Email</span><span>${escapeHtml(user.email ?? "\u2014")}</span></div>
2143
+ <div class="spread"><span class="muted">Primary identity</span><span>${escapeHtml(user.primary_auth_identity_id ?? "\u2014")}</span></div>
2144
+ </div>
2145
+ </div>`;
2146
+ };
2147
+ const authMenu = (user) => {
2148
+ if (!user) {
2149
+ return `<a class="btn btn--primary btn--sm" href="/htmx">Sign in</a>`;
2150
+ }
2151
+ const label = user.email ?? user.first_name ?? "Account";
2152
+ return `<span class="muted">${escapeHtml(label)}</span><a class="btn btn--ghost btn--sm" href="/htmx/signout">Sign out</a>`;
2153
+ };
2154
+ const connectorLinks = () => connectorTargets.map((target) => `<div class="card text-left"><h2 class="card__title row"><img class="entity__logo" alt="" src="${providerLogo(target.provider)}" />${escapeHtml(target.label)}</h2><p class="muted">${escapeHtml(target.description)}</p><a class="btn btn--primary" href="${authorizationHref(target.provider, "connector")}">Link ${escapeHtml(target.label)}</a></div>`).join("");
2155
+ const connectors = (payload) => {
2156
+ const scopeList = (scopes) => scopes.map((scope) => `<span class="scope">${escapeHtml(scope)}</span>`).join("");
2157
+ const bindings = payload.bindings.length === 0 ? `<div class="empty-state">No external accounts linked.</div>` : `<div class="entity-list">${payload.bindings.map((binding) => `<div class="entity"><div class="entity__meta"><span class="entity__title">${escapeHtml(binding.label ?? binding.externalAccountId)}<span class="pill">${escapeHtml(binding.connectorProvider)}</span></span><span class="entity__sub">${escapeHtml(binding.externalAccountType)} \xB7 ${escapeHtml(binding.status)}</span><div class="scope-list">${scopeList(binding.availableScopes)}</div></div><div class="entity__actions"><form hx-delete="/htmx/connectors/bindings/${binding.id}" hx-target="#connector-list" hx-swap="innerHTML"><button class="btn btn--danger btn--sm" type="submit">Remove</button></form></div></div>`).join("")}</div>`;
2158
+ const grants = payload.grants.length === 0 ? `<div class="empty-state">No connector grants yet.</div>` : `<div class="entity-list">${payload.grants.map((grant) => `<div class="entity"><div class="entity__meta"><span class="entity__title">${escapeHtml(grant.authProviderKey)}<span class="pill pill--indigo">${escapeHtml(grant.status)}</span></span><span class="entity__sub">Subject ${escapeHtml(grant.providerSubject)}</span><div class="scope-list">${scopeList(grant.grantedScopes)}</div></div><div class="entity__actions"><form hx-delete="/htmx/connectors/grants/${grant.id}" hx-target="#connector-list" hx-swap="innerHTML"><button class="btn btn--danger btn--sm" type="submit">Remove</button></form></div></div>`).join("")}</div>`;
2159
+ return `<h3 class="provider-heading">External accounts</h3>${bindings}<h3 class="provider-heading">Grants</h3>${grants}`;
2160
+ };
2161
+ const identities = (payload, query) => {
2162
+ const pending = payload.mergeRequests.filter((req) => req.status === "pending");
2163
+ const mergesHtml = pending.length === 0 ? "" : `<div class="stack"><h3 class="provider-heading">Merge requests</h3><div class="entity-list">${pending.map((req) => `<div class="entity card--danger"><div class="entity__meta"><span class="entity__title">${escapeHtml(providerLabel(req.conflicting_auth_provider))} conflict</span><span class="entity__sub">Subject ${escapeHtml(req.conflicting_provider_subject)}</span></div><div class="entity__actions">
2164
+ <form hx-post="/htmx/merge/${req.id}" hx-target="#identities-list" hx-swap="innerHTML" hx-include="#identity-query"><button class="btn btn--primary btn--sm" type="submit">Merge</button></form>
2165
+ <form hx-delete="/htmx/merge/${req.id}" hx-target="#identities-list" hx-swap="innerHTML" hx-include="#identity-query"><button class="btn btn--ghost btn--sm" type="submit">Dismiss</button></form>
2166
+ </div></div>`).join("")}</div></div>`;
2167
+ const term = query.trim().toLowerCase();
2168
+ const groups = Object.entries(payload.identities).map(([provider, list]) => ({
2169
+ identities: list.filter((identity) => term === "" || providerLabel(provider).toLowerCase().includes(term) || identity.id.toLowerCase().includes(term) || identity.provider_subject.toLowerCase().includes(term)),
2170
+ provider
2171
+ })).filter((group) => group.identities.length > 0);
2172
+ const groupsHtml = groups.length === 0 ? `<div class="empty-state">No identities match your search.</div>` : groups.map((group) => `<div class="provider-group"><h3 class="provider-heading">${providerLogo(group.provider) ? `<img class="entity__logo" alt="" src="${providerLogo(group.provider)}" />` : ""}${escapeHtml(providerLabel(group.provider))}</h3><div class="entity-list">${group.identities.map((identity) => `<div class="entity"><div class="entity__main"><div class="entity__meta"><span class="entity__title">${escapeHtml(identity.provider_subject)}${identity.isPrimary ? `<span class="pill pill--primary">Primary</span>` : ""}</span><span class="entity__sub">${escapeHtml(identity.id)}</span></div></div><div class="entity__actions">
2173
+ ${identity.isPrimary ? "" : `<form hx-post="/htmx/identities/${identity.id}/primary" hx-target="#identities-list" hx-swap="innerHTML" hx-include="#identity-query"><button class="btn btn--neutral btn--sm" type="submit">Set primary</button></form>`}
2174
+ <form hx-delete="/htmx/identities/${identity.id}" hx-target="#identities-list" hx-swap="innerHTML" hx-include="#identity-query"><button class="btn btn--danger btn--sm" type="submit">Remove</button></form>
2175
+ </div></div>`).join("")}</div></div>`).join("");
2176
+ return `${mergesHtml}${groupsHtml}`;
2177
+ };
2178
+ const protectedView = (user) => `<section class="auth-section stack"><div><h1 class="page-heading">Protected page</h1><p class="muted">Your authenticated session resolves to this user record.</p></div><pre class="json">${escapeHtml(JSON.stringify(user, null, 2))}</pre></section>`;
2179
+ const providerLogin = (verb, includeDropdown) => {
2180
+ const featured = featuredLoginProviders.map((provider) => `<a class="oauth-button" href="${authorizationHref(provider)}"><img class="oauth-button__icon" alt="" src="${providerLogo(provider)}" /><span class="oauth-button__text">${escapeHtml(verb)} ${escapeHtml(providerLabel(provider))}</span></a>`).join("");
2181
+ if (!includeDropdown) {
2182
+ return `<div class="oauth-grid">${featured}</div>`;
2183
+ }
2184
+ const options = providerOptions.map((provider) => `<option value="${provider}">${escapeHtml(providerLabel(provider))}</option>`).join("");
2185
+ return `<div class="oauth-grid">${featured}
2186
+ <div class="separator"><span class="separator__line"></span><span class="separator__text">or any provider</span><span class="separator__line"></span></div>
2187
+ <form class="oauth-grid" action="/htmx/login-redirect" method="get">
2188
+ <select class="provider-select" name="provider" required>
2189
+ <option value="">Select a provider\u2026</option>${options}
2190
+ </select>
2191
+ <button class="btn btn--primary" type="submit">Continue</button>
2192
+ </form>
2193
+ </div>`;
2194
+ };
2195
+ return {
2196
+ account: overrides.account ?? account,
2197
+ authMenu: overrides.authMenu ?? authMenu,
2198
+ connectorLinks: overrides.connectorLinks ?? connectorLinks,
2199
+ connectors: overrides.connectors ?? connectors,
2200
+ escapeHtml,
2201
+ identities: overrides.identities ?? identities,
2202
+ protected: overrides.protected ?? protectedView,
2203
+ providerLogin: overrides.providerLogin ?? providerLogin
2204
+ };
2205
+ };
2206
+ export {
2207
+ resolveAuthHtmxRenderers,
2208
+ escapeHtml
2209
+ };
2210
+
2211
+ //# debugId=E4E67AE168C02C8A64756E2164756E21
2212
+ //# sourceMappingURL=index.js.map