@miguelmorales13/nestkit 0.25.0 → 0.28.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.
- package/README.md +5 -0
- package/dist/alerts/alert-on-failure.decorator.d.ts +5 -0
- package/dist/alerts/alert-sinks.d.ts +29 -0
- package/dist/alerts/alerts.module.d.ts +19 -0
- package/dist/alerts/alerts.options.d.ts +1 -0
- package/dist/alerts/alerts.service.d.ts +28 -0
- package/dist/alerts/alerts.types.d.ts +66 -0
- package/dist/alerts/index.cjs +276 -0
- package/dist/alerts/index.d.ts +10 -0
- package/dist/alerts/index.js +276 -0
- package/dist/alerts/logger-with-alerts.d.ts +18 -0
- package/dist/alerts/process-guards.d.ts +21 -0
- package/dist/alerts/runtime.d.ts +4 -0
- package/dist/audit/index.cjs +13 -13
- package/dist/audit/index.js +2 -2
- package/dist/auth/index.cjs +21 -21
- package/dist/auth/index.js +3 -3
- package/dist/auth/oauth/index.cjs +123 -115
- package/dist/auth/oauth/index.js +25 -17
- package/dist/auth/oauth/oauth-provider.d.ts +9 -0
- package/dist/auth/oauth/providers/apple.d.ts +3 -1
- package/dist/bootstrap/apply-defaults.d.ts +9 -0
- package/dist/bootstrap/index.cjs +6 -5
- package/dist/bootstrap/index.js +5 -4
- package/dist/chunk-3TUMVLPJ.js +14 -0
- package/dist/{chunk-PA24P76K.js → chunk-45SW7FBE.js} +1 -1
- package/dist/{chunk-RF75KC63.cjs → chunk-47IYXZHW.cjs} +2 -2
- package/dist/{chunk-TUNDBBQF.js → chunk-4WWOKZIO.js} +4 -4
- package/dist/{chunk-A2DGK4ZL.js → chunk-5LVGCTJ3.js} +1 -1
- package/dist/chunk-A6YGIZCQ.cjs +14 -0
- package/dist/chunk-A7FI6HXV.js +40 -0
- package/dist/chunk-CU4FUIVJ.cjs +8 -0
- package/dist/{chunk-FH5UNWWW.cjs → chunk-D35TBVRO.cjs} +4 -4
- package/dist/{chunk-4MGIQFAJ.js → chunk-D3DDJWUD.js} +5 -0
- package/dist/chunk-DVGPEBUL.js +8 -0
- package/dist/{chunk-VKOPDDCC.js → chunk-ENZ7LQRE.js} +1 -1
- package/dist/{chunk-3AUOOEQO.cjs → chunk-F77X4QUN.cjs} +2 -2
- package/dist/chunk-FBNV5X6C.js +61 -0
- package/dist/{chunk-APUFKA4K.cjs → chunk-FDZQCLLK.cjs} +6 -6
- package/dist/{chunk-DYHSOULW.js → chunk-IGSNB5BX.js} +1 -1
- package/dist/chunk-IVWPA6QH.cjs +90 -0
- package/dist/{chunk-MSTXS3MU.cjs → chunk-JJKGQNGD.cjs} +2 -2
- package/dist/{chunk-FNUZGYUF.cjs → chunk-JRFE7NSO.cjs} +12 -4
- package/dist/{chunk-HVHYZXBB.cjs → chunk-KNU5RN3O.cjs} +3 -3
- package/dist/{chunk-52IOOHNX.cjs → chunk-KQPJCVN3.cjs} +26 -26
- package/dist/chunk-LGFHLAY3.cjs +61 -0
- package/dist/{chunk-2REOCMUD.cjs → chunk-LRX7AMSS.cjs} +6 -1
- package/dist/{chunk-4PFAKLT3.js → chunk-MUWHGBIB.js} +1 -1
- package/dist/{chunk-ZJMLEP5H.js → chunk-NJYLQDB3.js} +1 -1
- package/dist/{chunk-IFNYRZP2.js → chunk-OSRH6KYZ.js} +4 -4
- package/dist/{chunk-6RAPVLJM.js → chunk-OTE77ONL.js} +1 -1
- package/dist/chunk-UDACUMLO.cjs +40 -0
- package/dist/{chunk-UNEVXCFW.js → chunk-UGAAJRPO.js} +10 -2
- package/dist/{chunk-SPTDXUED.cjs → chunk-URLDTS2Q.cjs} +2 -2
- package/dist/{chunk-W2T2VFLC.cjs → chunk-VALDHJOO.cjs} +5 -5
- package/dist/chunk-WFCQDOSN.js +90 -0
- package/dist/consent/consent.interceptor.d.ts +20 -0
- package/dist/consent/consent.module.d.ts +25 -0
- package/dist/consent/consent.options.d.ts +30 -0
- package/dist/consent/consent.port.d.ts +17 -0
- package/dist/consent/consent.service.d.ts +44 -0
- package/dist/consent/guard/index.cjs +13 -0
- package/dist/consent/guard/index.d.ts +31 -0
- package/dist/consent/guard/index.js +13 -0
- package/dist/consent/index.cjs +271 -0
- package/dist/consent/index.d.ts +13 -0
- package/dist/consent/index.js +271 -0
- package/dist/consent/memory.store.d.ts +7 -0
- package/dist/consent/shared/index.cjs +11 -0
- package/dist/consent/shared/index.d.ts +19 -0
- package/dist/consent/shared/index.js +11 -0
- package/dist/consent/typeorm.store.d.ts +22 -0
- package/dist/crud/index.cjs +4 -4
- package/dist/crud/index.js +3 -3
- package/dist/database/postgres/index.cjs +3 -3
- package/dist/database/postgres/index.js +2 -2
- package/dist/database/supabase/index.cjs +3 -3
- package/dist/database/supabase/index.js +2 -2
- package/dist/database/typeorm/index.cjs +2 -2
- package/dist/database/typeorm/index.js +1 -1
- package/dist/devices/device-check.interceptor.d.ts +20 -0
- package/dist/devices/devices.module.d.ts +28 -0
- package/dist/devices/devices.options.d.ts +53 -0
- package/dist/devices/devices.port.d.ts +62 -0
- package/dist/devices/devices.service.d.ts +58 -0
- package/dist/devices/index.cjs +327 -0
- package/dist/devices/index.d.ts +8 -0
- package/dist/devices/index.js +327 -0
- package/dist/devices/memory.store.d.ts +12 -0
- package/dist/email/index.cjs +2 -2
- package/dist/email/index.js +1 -1
- package/dist/email/nodemailer/index.cjs +2 -2
- package/dist/email/nodemailer/index.js +1 -1
- package/dist/email/resend/index.cjs +2 -2
- package/dist/email/resend/index.js +1 -1
- package/dist/entities/index.cjs +1 -1
- package/dist/entities/index.js +1 -1
- package/dist/errors/index.cjs +7 -7
- package/dist/errors/index.js +7 -7
- package/dist/events/buses.d.ts +27 -0
- package/dist/events/events.controller.d.ts +15 -0
- package/dist/events/events.module.d.ts +29 -0
- package/dist/events/events.options.d.ts +50 -0
- package/dist/events/events.service.d.ts +49 -0
- package/dist/events/events.types.d.ts +77 -0
- package/dist/events/index.cjs +557 -0
- package/dist/events/index.d.ts +10 -0
- package/dist/events/index.js +557 -0
- package/dist/events/memory-ticket.store.d.ts +9 -0
- package/dist/google-business/google-business-http.d.ts +41 -0
- package/dist/google-business/google-business.errors.d.ts +75 -0
- package/dist/google-business/google-business.mappers.d.ts +52 -0
- package/dist/google-business/google-business.module.d.ts +26 -0
- package/dist/google-business/google-business.options.d.ts +40 -0
- package/dist/google-business/google-business.ports.d.ts +18 -0
- package/dist/google-business/google-business.service.d.ts +120 -0
- package/dist/google-business/google-business.types.d.ts +155 -0
- package/dist/google-business/index.cjs +1025 -0
- package/dist/google-business/index.d.ts +15 -0
- package/dist/google-business/index.js +1025 -0
- package/dist/google-business/testing/google-simulator.d.ts +61 -0
- package/dist/hardening/body-limits.d.ts +24 -0
- package/dist/hardening/http.types.d.ts +26 -0
- package/dist/hardening/index.cjs +179 -0
- package/dist/hardening/index.d.ts +19 -0
- package/dist/hardening/index.js +179 -0
- package/dist/hardening/memory-rate-limit.store.d.ts +10 -0
- package/dist/hardening/origin-secret.d.ts +29 -0
- package/dist/hardening/rate-limit.decorator.d.ts +8 -0
- package/dist/hardening/rate-limit.guard.d.ts +18 -0
- package/dist/hardening/rate-limit.module.d.ts +23 -0
- package/dist/hardening/rate-limit.options.d.ts +35 -0
- package/dist/hardening/rate-limit.port.d.ts +11 -0
- package/dist/hardening/redis-rate-limit.store.d.ts +23 -0
- package/dist/hardening/trust-proxy.d.ts +22 -0
- package/dist/health/health.controller.d.ts +32 -0
- package/dist/health/health.module.d.ts +15 -0
- package/dist/health/health.options.d.ts +24 -0
- package/dist/health/index.cjs +103 -0
- package/dist/health/index.d.ts +5 -0
- package/dist/health/index.js +103 -0
- package/dist/i18n/index.cjs +3 -3
- package/dist/i18n/index.js +2 -2
- package/dist/idempotency/idempotency.interceptor.d.ts +1 -0
- package/dist/idempotency/idempotency.options.d.ts +15 -0
- package/dist/idempotency/index.cjs +214 -7
- package/dist/idempotency/index.d.ts +5 -0
- package/dist/idempotency/index.js +210 -3
- package/dist/idempotency/no-idempotency.decorator.d.ts +8 -0
- package/dist/idempotency/postgres.store.d.ts +49 -0
- package/dist/idempotency/redis.store.d.ts +59 -0
- package/dist/index.cjs +21 -20
- package/dist/index.js +31 -30
- package/dist/invoicing/index.cjs +2 -2
- package/dist/invoicing/index.js +1 -1
- package/dist/jobs/defer-job.d.ts +10 -0
- package/dist/jobs/index.cjs +318 -0
- package/dist/jobs/index.d.ts +8 -0
- package/dist/jobs/index.js +318 -0
- package/dist/jobs/jobs-admin.controller.d.ts +18 -0
- package/dist/jobs/jobs.module.d.ts +33 -0
- package/dist/jobs/jobs.options.d.ts +62 -0
- package/dist/jobs/jobs.service.d.ts +53 -0
- package/dist/jobs/jobs.sql.d.ts +11 -0
- package/dist/media/index.cjs +14 -14
- package/dist/media/index.js +1 -1
- package/dist/meta/index.cjs +3 -3
- package/dist/meta/index.js +1 -1
- package/dist/notifications/index.cjs +375 -0
- package/dist/notifications/index.d.ts +8 -0
- package/dist/notifications/index.js +375 -0
- package/dist/notifications/memory.stores.d.ts +23 -0
- package/dist/notifications/notifications.controller.d.ts +11 -0
- package/dist/notifications/notifications.module.d.ts +31 -0
- package/dist/notifications/notifications.options.d.ts +33 -0
- package/dist/notifications/notifications.port.d.ts +97 -0
- package/dist/notifications/notifier.service.d.ts +31 -0
- package/dist/payments/index.cjs +7 -7
- package/dist/payments/index.js +1 -1
- package/dist/pinterest/index.cjs +3 -3
- package/dist/pinterest/index.js +1 -1
- package/dist/privacy/anonymizer.d.ts +14 -0
- package/dist/privacy/index.cjs +768 -0
- package/dist/privacy/index.d.ts +13 -0
- package/dist/privacy/index.js +768 -0
- package/dist/privacy/memory.store.d.ts +15 -0
- package/dist/privacy/privacy.module.d.ts +30 -0
- package/dist/privacy/privacy.options.d.ts +43 -0
- package/dist/privacy/privacy.port.d.ts +25 -0
- package/dist/privacy/privacy.service.d.ts +69 -0
- package/dist/privacy/privacy.types.d.ts +125 -0
- package/dist/privacy/sql.d.ts +7 -0
- package/dist/privacy/sql.store.d.ts +21 -0
- package/dist/privacy/zip.d.ts +23 -0
- package/dist/push/index.cjs +13 -13
- package/dist/push/index.js +5 -5
- package/dist/resilience/alert-channels.d.ts +39 -0
- package/dist/resilience/alert-errors.interceptor.d.ts +10 -0
- package/dist/resilience/alert-on-failure.decorator.d.ts +10 -0
- package/dist/resilience/alert.service.d.ts +77 -0
- package/dist/resilience/index.cjs +863 -0
- package/dist/resilience/index.d.ts +18 -0
- package/dist/resilience/index.js +863 -0
- package/dist/resilience/memory-alert-store.d.ts +26 -0
- package/dist/resilience/provider-health.controller.d.ts +14 -0
- package/dist/resilience/provider-unavailable.exception.d.ts +11 -0
- package/dist/resilience/resilience.module.d.ts +34 -0
- package/dist/resilience/resilience.options.d.ts +28 -0
- package/dist/resilience/resilience.types.d.ts +167 -0
- package/dist/resilience/resilient-fetch.d.ts +38 -0
- package/dist/resilience/runtime.d.ts +24 -0
- package/dist/resilience/typeorm/alert.entity.d.ts +21 -0
- package/dist/resilience/typeorm/index.cjs +102 -0
- package/dist/resilience/typeorm/index.d.ts +3 -0
- package/dist/resilience/typeorm/index.js +102 -0
- package/dist/resilience/typeorm/typeorm-alert-store.d.ts +39 -0
- package/dist/resilience/validate-destination.d.ts +63 -0
- package/dist/response/index.cjs +3 -3
- package/dist/response/index.js +2 -2
- package/dist/scheduling/cron-lock.service.d.ts +36 -0
- package/dist/scheduling/cron-unico.decorator.d.ts +27 -0
- package/dist/scheduling/fallback.store.d.ts +34 -0
- package/dist/scheduling/index.cjs +392 -0
- package/dist/scheduling/index.d.ts +18 -0
- package/dist/scheduling/index.js +392 -0
- package/dist/scheduling/lock-store.port.d.ts +19 -0
- package/dist/scheduling/memory.store.d.ts +15 -0
- package/dist/scheduling/redis.module.d.ts +31 -0
- package/dist/scheduling/redis.store.d.ts +24 -0
- package/dist/scheduling/scheduling.module.d.ts +24 -0
- package/dist/scheduling/scheduling.options.d.ts +27 -0
- package/dist/scheduling/sql.store.d.ts +26 -0
- package/dist/secrets/index.cjs +274 -0
- package/dist/secrets/index.d.ts +8 -0
- package/dist/secrets/index.js +274 -0
- package/dist/secrets/secrets.errors.d.ts +6 -0
- package/dist/secrets/secrets.module.d.ts +21 -0
- package/dist/secrets/secrets.options.d.ts +32 -0
- package/dist/secrets/secrets.service.d.ts +54 -0
- package/dist/secrets/secrets.transformer.d.ts +33 -0
- package/dist/security/hash.d.ts +8 -0
- package/dist/security/index.cjs +119 -2
- package/dist/security/index.d.ts +5 -0
- package/dist/security/index.js +119 -2
- package/dist/security/mask.d.ts +22 -0
- package/dist/security/signed-grant.d.ts +30 -0
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +1 -1
- package/dist/stripe/index.cjs +7 -7
- package/dist/stripe/index.js +1 -1
- package/dist/telegram/index.cjs +2 -2
- package/dist/telegram/index.js +1 -1
- package/dist/tenancy/app-role.d.ts +24 -0
- package/dist/tenancy/db-helpers.d.ts +12 -0
- package/dist/tenancy/index.cjs +205 -0
- package/dist/tenancy/index.d.ts +14 -0
- package/dist/tenancy/index.js +205 -0
- package/dist/tenancy/pg/index.cjs +34 -0
- package/dist/tenancy/pg/index.d.ts +2 -0
- package/dist/tenancy/pg/index.js +34 -0
- package/dist/tenancy/pg/with-tenant.d.ts +23 -0
- package/dist/tenancy/request-context.d.ts +18 -0
- package/dist/tenancy/rls-guardrail.d.ts +38 -0
- package/dist/tenancy/scope.d.ts +5 -0
- package/dist/tenancy/tenancy.errors.d.ts +5 -0
- package/dist/tenancy/tenancy.middleware.d.ts +8 -0
- package/dist/tenancy/tenancy.module.d.ts +37 -0
- package/dist/tenancy/tenancy.options.d.ts +34 -0
- package/dist/tenancy/typeorm/index.cjs +41 -0
- package/dist/tenancy/typeorm/index.d.ts +2 -0
- package/dist/tenancy/typeorm/index.js +41 -0
- package/dist/tenancy/typeorm/with-tenant.d.ts +23 -0
- package/dist/tiktok/index.cjs +3 -3
- package/dist/tiktok/index.js +1 -1
- package/dist/tracking/index.cjs +3 -3
- package/dist/tracking/index.js +2 -2
- package/dist/umami/index.cjs +4 -4
- package/dist/umami/index.js +1 -1
- package/dist/whatsapp/index.cjs +2 -2
- package/dist/whatsapp/index.js +1 -1
- package/package.json +107 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkD35TBVROcjs = require('../../chunk-D35TBVRO.cjs');
|
|
5
|
+
require('../../chunk-SDWHKPXI.cjs');
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
var _chunkHDFPSA2Vcjs = require('../../chunk-HDFPSA2V.cjs');
|
|
10
|
-
require('../../chunk-SDWHKPXI.cjs');
|
|
11
11
|
require('../../chunk-Q5Y33L7B.cjs');
|
|
12
12
|
require('../../chunk-PNK5WMPP.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkLRX7AMSScjs = require('../../chunk-LRX7AMSS.cjs');
|
|
17
17
|
|
|
18
18
|
// src/auth/oauth/oauth-provider.ts
|
|
19
19
|
async function readJson(response, what) {
|
|
@@ -32,6 +32,7 @@ async function readJson(response, what) {
|
|
|
32
32
|
function googleProvider(credentials = {}) {
|
|
33
33
|
return {
|
|
34
34
|
name: "google",
|
|
35
|
+
fetchImpl: credentials.fetchImpl,
|
|
35
36
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.GOOGLE_CLIENT_ID)),
|
|
36
37
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.GOOGLE_CLIENT_SECRET)),
|
|
37
38
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.GOOGLE_CALLBACK_URL)),
|
|
@@ -47,7 +48,7 @@ function googleProvider(credentials = {}) {
|
|
|
47
48
|
},
|
|
48
49
|
async fetchProfile(accessToken) {
|
|
49
50
|
const data = await readJson(
|
|
50
|
-
await fetch("https://www.googleapis.com/oauth2/v3/userinfo", {
|
|
51
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://www.googleapis.com/oauth2/v3/userinfo", {
|
|
51
52
|
headers: { Authorization: `Bearer ${accessToken}` }
|
|
52
53
|
}),
|
|
53
54
|
"Google userinfo"
|
|
@@ -69,6 +70,7 @@ function facebookProvider(credentials = {}) {
|
|
|
69
70
|
const version = _nullishCoalesce(process.env.FACEBOOK_GRAPH_VERSION, () => ( "v21.0"));
|
|
70
71
|
return {
|
|
71
72
|
name: "facebook",
|
|
73
|
+
fetchImpl: credentials.fetchImpl,
|
|
72
74
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.FACEBOOK_APP_ID)),
|
|
73
75
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.FACEBOOK_APP_SECRET)),
|
|
74
76
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.FACEBOOK_CALLBACK_URL)),
|
|
@@ -79,7 +81,7 @@ function facebookProvider(credentials = {}) {
|
|
|
79
81
|
const url = new URL(`https://graph.facebook.com/${version}/me`);
|
|
80
82
|
url.searchParams.set("fields", "id,name,email,picture.type(large)");
|
|
81
83
|
const data = await readJson(
|
|
82
|
-
await fetch(url, { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
84
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))(url, { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
83
85
|
"Facebook me"
|
|
84
86
|
);
|
|
85
87
|
const picture = data.picture;
|
|
@@ -113,7 +115,7 @@ async function exchangeCode(provider, code) {
|
|
|
113
115
|
code
|
|
114
116
|
});
|
|
115
117
|
const data = await readJson(
|
|
116
|
-
await fetch(provider.tokenUrl, {
|
|
118
|
+
await (_nullishCoalesce(provider.fetchImpl, () => ( fetch)))(provider.tokenUrl, {
|
|
117
119
|
method: "POST",
|
|
118
120
|
headers: {
|
|
119
121
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -145,6 +147,7 @@ function appleProvider(credentials = {}) {
|
|
|
145
147
|
const configured = Boolean(clientId && teamId && keyId && privateKey);
|
|
146
148
|
return {
|
|
147
149
|
name: "apple",
|
|
150
|
+
fetchImpl: credentials.fetchImpl,
|
|
148
151
|
clientId,
|
|
149
152
|
// Only offered as configured when every piece exists: `provider()` tests
|
|
150
153
|
// `clientSecret` for truthiness, and a function that would throw later
|
|
@@ -158,7 +161,7 @@ function appleProvider(credentials = {}) {
|
|
|
158
161
|
callbackMethod: "POST",
|
|
159
162
|
async fetchProfile(_accessToken, tokens, callback) {
|
|
160
163
|
if (!tokens.id_token) throw new Error("Apple token exchange returned no id_token.");
|
|
161
|
-
const claims = await verifyAppleIdToken(tokens.id_token, clientId, keysUrl);
|
|
164
|
+
const claims = await verifyAppleIdToken(tokens.id_token, clientId, keysUrl, credentials.fetchImpl);
|
|
162
165
|
const verified = claims.email_verified === true || claims.email_verified === "true";
|
|
163
166
|
return {
|
|
164
167
|
providerAccountId: claims.sub,
|
|
@@ -180,17 +183,17 @@ function mintClientSecret(clientId, teamId, keyId, privateKey) {
|
|
|
180
183
|
}
|
|
181
184
|
var cachedKeys;
|
|
182
185
|
var KEYS_TTL_MS = 60 * 60 * 1e3;
|
|
183
|
-
async function appleKeys(keysUrl, kid) {
|
|
186
|
+
async function appleKeys(keysUrl, kid, fetchImpl) {
|
|
184
187
|
const fresh = cachedKeys && Date.now() - cachedKeys.fetchedAt < KEYS_TTL_MS;
|
|
185
188
|
if (fresh && cachedKeys.keys.some((k) => k.kid === kid)) return cachedKeys.keys;
|
|
186
|
-
const data = await readJson(await fetch(keysUrl), "Apple keys");
|
|
189
|
+
const data = await readJson(await (_nullishCoalesce(fetchImpl, () => ( fetch)))(keysUrl), "Apple keys");
|
|
187
190
|
cachedKeys = { fetchedAt: Date.now(), keys: _nullishCoalesce(data.keys, () => ( [])) };
|
|
188
191
|
return cachedKeys.keys;
|
|
189
192
|
}
|
|
190
|
-
async function verifyAppleIdToken(idToken, clientId, keysUrl = KEYS_URL) {
|
|
193
|
+
async function verifyAppleIdToken(idToken, clientId, keysUrl = KEYS_URL, fetchImpl) {
|
|
191
194
|
const decoded = _jsonwebtoken2.default.decode(idToken, { complete: true });
|
|
192
195
|
const kid = _optionalChain([decoded, 'optionalAccess', _5 => _5.header, 'access', _6 => _6.kid]);
|
|
193
|
-
const key = (await appleKeys(keysUrl, kid)).find((k) => k.kid === kid);
|
|
196
|
+
const key = (await appleKeys(keysUrl, kid, fetchImpl)).find((k) => k.kid === kid);
|
|
194
197
|
if (!key) throw new Error("Apple id_token is signed with a key Apple does not publish.");
|
|
195
198
|
const pem = _crypto.createPublicKey.call(void 0, { key, format: "jwk" }).export({ type: "spki", format: "pem" });
|
|
196
199
|
return _jsonwebtoken2.default.verify(idToken, pem, { algorithms: ["RS256"], audience: clientId, issuer: ISSUER });
|
|
@@ -211,6 +214,7 @@ function nameFromCallback(callback) {
|
|
|
211
214
|
function tiktokProvider(credentials = {}) {
|
|
212
215
|
return {
|
|
213
216
|
name: "tiktok",
|
|
217
|
+
fetchImpl: credentials.fetchImpl,
|
|
214
218
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.TIKTOK_CLIENT_KEY)),
|
|
215
219
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.TIKTOK_CLIENT_SECRET)),
|
|
216
220
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.TIKTOK_CALLBACK_URL)),
|
|
@@ -222,7 +226,7 @@ function tiktokProvider(credentials = {}) {
|
|
|
222
226
|
const url = new URL("https://open.tiktokapis.com/v2/user/info/");
|
|
223
227
|
url.searchParams.set("fields", "open_id,display_name,avatar_url");
|
|
224
228
|
const data = await readJson(
|
|
225
|
-
await fetch(url, { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
229
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))(url, { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
226
230
|
"TikTok user info"
|
|
227
231
|
);
|
|
228
232
|
const error = data.error;
|
|
@@ -243,6 +247,7 @@ function tiktokProvider(credentials = {}) {
|
|
|
243
247
|
function githubProvider(credentials = {}) {
|
|
244
248
|
return {
|
|
245
249
|
name: "github",
|
|
250
|
+
fetchImpl: credentials.fetchImpl,
|
|
246
251
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.GITHUB_CLIENT_ID)),
|
|
247
252
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.GITHUB_CLIENT_SECRET)),
|
|
248
253
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.GITHUB_CALLBACK_URL)),
|
|
@@ -255,9 +260,9 @@ function githubProvider(credentials = {}) {
|
|
|
255
260
|
Accept: "application/vnd.github+json",
|
|
256
261
|
"User-Agent": "nestkit"
|
|
257
262
|
};
|
|
258
|
-
const user = await readJson(await fetch("https://api.github.com/user", { headers }), "GitHub user");
|
|
263
|
+
const user = await readJson(await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://api.github.com/user", { headers }), "GitHub user");
|
|
259
264
|
const emails = await readJson(
|
|
260
|
-
await fetch("https://api.github.com/user/emails", { headers }),
|
|
265
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://api.github.com/user/emails", { headers }),
|
|
261
266
|
"GitHub emails"
|
|
262
267
|
);
|
|
263
268
|
const primary = Array.isArray(emails) ? _nullishCoalesce(emails.find((e) => e.primary && e.verified), () => ( emails.find((e) => e.verified))) : void 0;
|
|
@@ -276,6 +281,7 @@ function microsoftProvider(credentials = {}) {
|
|
|
276
281
|
const tenant = _nullishCoalesce(_nullishCoalesce(credentials.tenant, () => ( process.env.MICROSOFT_TENANT)), () => ( "common"));
|
|
277
282
|
return {
|
|
278
283
|
name: "microsoft",
|
|
284
|
+
fetchImpl: credentials.fetchImpl,
|
|
279
285
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.MICROSOFT_CLIENT_ID)),
|
|
280
286
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.MICROSOFT_CLIENT_SECRET)),
|
|
281
287
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.MICROSOFT_CALLBACK_URL)),
|
|
@@ -284,7 +290,7 @@ function microsoftProvider(credentials = {}) {
|
|
|
284
290
|
scope: _nullishCoalesce(credentials.scope, () => ( "openid profile email User.Read")),
|
|
285
291
|
async fetchProfile(accessToken) {
|
|
286
292
|
const me = await readJson(
|
|
287
|
-
await fetch("https://graph.microsoft.com/v1.0/me", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
293
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://graph.microsoft.com/v1.0/me", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
288
294
|
"Microsoft Graph me"
|
|
289
295
|
);
|
|
290
296
|
const email = _nullishCoalesce(me.mail, () => ( me.userPrincipalName));
|
|
@@ -301,6 +307,7 @@ function microsoftProvider(credentials = {}) {
|
|
|
301
307
|
function discordProvider(credentials = {}) {
|
|
302
308
|
return {
|
|
303
309
|
name: "discord",
|
|
310
|
+
fetchImpl: credentials.fetchImpl,
|
|
304
311
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.DISCORD_CLIENT_ID)),
|
|
305
312
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.DISCORD_CLIENT_SECRET)),
|
|
306
313
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.DISCORD_CALLBACK_URL)),
|
|
@@ -309,7 +316,7 @@ function discordProvider(credentials = {}) {
|
|
|
309
316
|
scope: _nullishCoalesce(credentials.scope, () => ( "identify email")),
|
|
310
317
|
async fetchProfile(accessToken) {
|
|
311
318
|
const user = await readJson(
|
|
312
|
-
await fetch("https://discord.com/api/users/@me", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
319
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://discord.com/api/users/@me", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
313
320
|
"Discord user"
|
|
314
321
|
);
|
|
315
322
|
const id = String(user.id);
|
|
@@ -328,6 +335,7 @@ function discordProvider(credentials = {}) {
|
|
|
328
335
|
function linkedinProvider(credentials = {}) {
|
|
329
336
|
return {
|
|
330
337
|
name: "linkedin",
|
|
338
|
+
fetchImpl: credentials.fetchImpl,
|
|
331
339
|
clientId: _nullishCoalesce(credentials.clientId, () => ( process.env.LINKEDIN_CLIENT_ID)),
|
|
332
340
|
clientSecret: _nullishCoalesce(credentials.clientSecret, () => ( process.env.LINKEDIN_CLIENT_SECRET)),
|
|
333
341
|
callbackUrl: _nullishCoalesce(credentials.callbackUrl, () => ( process.env.LINKEDIN_CALLBACK_URL)),
|
|
@@ -336,7 +344,7 @@ function linkedinProvider(credentials = {}) {
|
|
|
336
344
|
scope: _nullishCoalesce(credentials.scope, () => ( "openid profile email")),
|
|
337
345
|
async fetchProfile(accessToken) {
|
|
338
346
|
const claims = await readJson(
|
|
339
|
-
await fetch("https://api.linkedin.com/v2/userinfo", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
347
|
+
await (_nullishCoalesce(credentials.fetchImpl, () => ( fetch)))("https://api.linkedin.com/v2/userinfo", { headers: { Authorization: `Bearer ${accessToken}` } }),
|
|
340
348
|
"LinkedIn userinfo"
|
|
341
349
|
);
|
|
342
350
|
return {
|
|
@@ -1215,21 +1223,21 @@ var OAuthAuthService = class {
|
|
|
1215
1223
|
}
|
|
1216
1224
|
}
|
|
1217
1225
|
};
|
|
1218
|
-
OAuthAuthService = exports.OAuthAuthService =
|
|
1226
|
+
OAuthAuthService = exports.OAuthAuthService = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1219
1227
|
_common.Injectable.call(void 0, ),
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1228
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, OAUTH_AUTH_OPTIONS)),
|
|
1229
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Inject.call(void 0, OAUTH_STORE)),
|
|
1230
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 2, _common.Inject.call(void 0, REFRESH_TOKEN_STORE)),
|
|
1231
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 3, _common.Optional.call(void 0, )),
|
|
1232
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 3, _common.Inject.call(void 0, MAGIC_LINK_STORE)),
|
|
1233
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 4, _common.Optional.call(void 0, )),
|
|
1234
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 4, _common.Inject.call(void 0, MAGIC_LINK_SENDER)),
|
|
1235
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 5, _common.Optional.call(void 0, )),
|
|
1236
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 5, _common.Inject.call(void 0, TWO_FACTOR_STORE)),
|
|
1237
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 6, _common.Optional.call(void 0, )),
|
|
1238
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 6, _common.Inject.call(void 0, PASSKEY_STORE)),
|
|
1239
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 7, _common.Optional.call(void 0, )),
|
|
1240
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 7, _common.Inject.call(void 0, WEBAUTHN))
|
|
1233
1241
|
], OAuthAuthService);
|
|
1234
1242
|
function normaliseEmail(email) {
|
|
1235
1243
|
return email.trim().toLowerCase();
|
|
@@ -1332,57 +1340,57 @@ var MemoryPasskeyStore = class {
|
|
|
1332
1340
|
var _classvalidator = require('class-validator');
|
|
1333
1341
|
var MagicLinkRequestDto = class {
|
|
1334
1342
|
};
|
|
1335
|
-
|
|
1343
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1336
1344
|
_classvalidator.IsEmail.call(void 0, )
|
|
1337
1345
|
], MagicLinkRequestDto.prototype, "email", 2);
|
|
1338
1346
|
var MagicLinkVerifyDto = class {
|
|
1339
1347
|
};
|
|
1340
|
-
|
|
1348
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1341
1349
|
_classvalidator.IsString.call(void 0, ),
|
|
1342
1350
|
_classvalidator.MinLength.call(void 0, 16)
|
|
1343
1351
|
], MagicLinkVerifyDto.prototype, "token", 2);
|
|
1344
1352
|
var TwoFactorCodeDto = class {
|
|
1345
1353
|
};
|
|
1346
|
-
|
|
1354
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1347
1355
|
_classvalidator.IsString.call(void 0, ),
|
|
1348
1356
|
_classvalidator.MinLength.call(void 0, 6)
|
|
1349
1357
|
], TwoFactorCodeDto.prototype, "code", 2);
|
|
1350
1358
|
var MfaVerifyDto = class {
|
|
1351
1359
|
};
|
|
1352
|
-
|
|
1360
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1353
1361
|
_classvalidator.IsString.call(void 0, ),
|
|
1354
1362
|
_classvalidator.MinLength.call(void 0, 16)
|
|
1355
1363
|
], MfaVerifyDto.prototype, "challenge", 2);
|
|
1356
|
-
|
|
1364
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1357
1365
|
_classvalidator.IsString.call(void 0, ),
|
|
1358
1366
|
_classvalidator.MinLength.call(void 0, 6)
|
|
1359
1367
|
], MfaVerifyDto.prototype, "code", 2);
|
|
1360
1368
|
var PasskeyRegisterDto = class {
|
|
1361
1369
|
};
|
|
1362
|
-
|
|
1370
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1363
1371
|
_classvalidator.IsString.call(void 0, ),
|
|
1364
1372
|
_classvalidator.MinLength.call(void 0, 16)
|
|
1365
1373
|
], PasskeyRegisterDto.prototype, "token", 2);
|
|
1366
|
-
|
|
1374
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1367
1375
|
_classvalidator.IsObject.call(void 0, )
|
|
1368
1376
|
], PasskeyRegisterDto.prototype, "response", 2);
|
|
1369
|
-
|
|
1377
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1370
1378
|
_classvalidator.IsOptional.call(void 0, ),
|
|
1371
1379
|
_classvalidator.IsString.call(void 0, )
|
|
1372
1380
|
], PasskeyRegisterDto.prototype, "name", 2);
|
|
1373
1381
|
var PasskeyLoginOptionsDto = class {
|
|
1374
1382
|
};
|
|
1375
|
-
|
|
1383
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1376
1384
|
_classvalidator.IsOptional.call(void 0, ),
|
|
1377
1385
|
_classvalidator.IsEmail.call(void 0, )
|
|
1378
1386
|
], PasskeyLoginOptionsDto.prototype, "email", 2);
|
|
1379
1387
|
var PasskeyLoginDto = class {
|
|
1380
1388
|
};
|
|
1381
|
-
|
|
1389
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1382
1390
|
_classvalidator.IsString.call(void 0, ),
|
|
1383
1391
|
_classvalidator.MinLength.call(void 0, 16)
|
|
1384
1392
|
], PasskeyLoginDto.prototype, "token", 2);
|
|
1385
|
-
|
|
1393
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1386
1394
|
_classvalidator.IsObject.call(void 0, )
|
|
1387
1395
|
], PasskeyLoginDto.prototype, "response", 2);
|
|
1388
1396
|
|
|
@@ -1424,9 +1432,9 @@ var OAuthCallbackFilter = class {
|
|
|
1424
1432
|
redirect(reply, this.options.onErrorRedirect(message));
|
|
1425
1433
|
}
|
|
1426
1434
|
};
|
|
1427
|
-
OAuthCallbackFilter = exports.OAuthCallbackFilter =
|
|
1435
|
+
OAuthCallbackFilter = exports.OAuthCallbackFilter = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1428
1436
|
_common.Catch.call(void 0, ),
|
|
1429
|
-
|
|
1437
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, OAUTH_AUTH_OPTIONS))
|
|
1430
1438
|
], OAuthCallbackFilter);
|
|
1431
1439
|
|
|
1432
1440
|
// src/auth/oauth/oauth.controller.ts
|
|
@@ -1445,7 +1453,7 @@ OAuthCallbackFilter = exports.OAuthCallbackFilter = _chunk2REOCMUDcjs.__decorate
|
|
|
1445
1453
|
|
|
1446
1454
|
|
|
1447
1455
|
function createOAuthController(options = {}) {
|
|
1448
|
-
const Guard = _nullishCoalesce(options.guard, () => (
|
|
1456
|
+
const Guard = _nullishCoalesce(options.guard, () => ( _chunkD35TBVROcjs.JwtAuthGuard));
|
|
1449
1457
|
const userId = _nullishCoalesce(options.userId, () => ( ((user) => user.sub)));
|
|
1450
1458
|
let OAuthControllerHost = class {
|
|
1451
1459
|
// Explicit token: the build emits no `design:paramtypes`, so a subclass
|
|
@@ -1618,140 +1626,140 @@ function createOAuthController(options = {}) {
|
|
|
1618
1626
|
});
|
|
1619
1627
|
}
|
|
1620
1628
|
};
|
|
1621
|
-
|
|
1629
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1622
1630
|
_common.Post.call(void 0, "refresh"),
|
|
1623
|
-
|
|
1624
|
-
|
|
1631
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Req.call(void 0, )),
|
|
1632
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1625
1633
|
], OAuthControllerHost.prototype, "refresh", 1);
|
|
1626
|
-
|
|
1634
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1627
1635
|
_common.Post.call(void 0, "logout"),
|
|
1628
|
-
|
|
1629
|
-
|
|
1636
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Req.call(void 0, )),
|
|
1637
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1630
1638
|
], OAuthControllerHost.prototype, "logout", 1);
|
|
1631
|
-
|
|
1639
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1632
1640
|
_common.UseGuards.call(void 0, Guard),
|
|
1633
1641
|
_common.Get.call(void 0, "me"),
|
|
1634
|
-
|
|
1642
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1635
1643
|
], OAuthControllerHost.prototype, "me", 1);
|
|
1636
|
-
|
|
1644
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1637
1645
|
_common.UseGuards.call(void 0, Guard),
|
|
1638
1646
|
_common.Get.call(void 0, "linked-accounts"),
|
|
1639
|
-
|
|
1647
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1640
1648
|
], OAuthControllerHost.prototype, "linkedAccounts", 1);
|
|
1641
|
-
|
|
1649
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1642
1650
|
_common.UseGuards.call(void 0, Guard),
|
|
1643
1651
|
_common.Post.call(void 0, "link-intent"),
|
|
1644
|
-
|
|
1645
|
-
|
|
1652
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1653
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1646
1654
|
], OAuthControllerHost.prototype, "linkIntent", 1);
|
|
1647
|
-
|
|
1655
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1648
1656
|
_common.Post.call(void 0, "magic-link"),
|
|
1649
|
-
|
|
1657
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Body.call(void 0, ))
|
|
1650
1658
|
], OAuthControllerHost.prototype, "requestMagicLink", 1);
|
|
1651
|
-
|
|
1659
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1652
1660
|
_common.Post.call(void 0, "magic-link/verify"),
|
|
1653
|
-
|
|
1654
|
-
|
|
1661
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Body.call(void 0, )),
|
|
1662
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1655
1663
|
], OAuthControllerHost.prototype, "verifyMagicLink", 1);
|
|
1656
|
-
|
|
1664
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1657
1665
|
_common.Post.call(void 0, "2fa/verify"),
|
|
1658
|
-
|
|
1659
|
-
|
|
1666
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Body.call(void 0, )),
|
|
1667
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1660
1668
|
], OAuthControllerHost.prototype, "verifyMfa", 1);
|
|
1661
|
-
|
|
1669
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1662
1670
|
_common.UseGuards.call(void 0, Guard),
|
|
1663
1671
|
_common.Get.call(void 0, "2fa"),
|
|
1664
|
-
|
|
1672
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1665
1673
|
], OAuthControllerHost.prototype, "twoFactorStatus", 1);
|
|
1666
|
-
|
|
1674
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1667
1675
|
_common.UseGuards.call(void 0, Guard),
|
|
1668
1676
|
_common.Post.call(void 0, "2fa/setup"),
|
|
1669
|
-
|
|
1677
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1670
1678
|
], OAuthControllerHost.prototype, "twoFactorSetup", 1);
|
|
1671
|
-
|
|
1679
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1672
1680
|
_common.UseGuards.call(void 0, Guard),
|
|
1673
1681
|
_common.Post.call(void 0, "2fa/confirm"),
|
|
1674
|
-
|
|
1675
|
-
|
|
1682
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1683
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Body.call(void 0, ))
|
|
1676
1684
|
], OAuthControllerHost.prototype, "twoFactorConfirm", 1);
|
|
1677
|
-
|
|
1685
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1678
1686
|
_common.UseGuards.call(void 0, Guard),
|
|
1679
1687
|
_common.Post.call(void 0, "2fa/disable"),
|
|
1680
|
-
|
|
1681
|
-
|
|
1688
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1689
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Body.call(void 0, ))
|
|
1682
1690
|
], OAuthControllerHost.prototype, "twoFactorDisable", 1);
|
|
1683
|
-
|
|
1691
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1684
1692
|
_common.UseGuards.call(void 0, Guard),
|
|
1685
1693
|
_common.Post.call(void 0, "passkeys/register/options"),
|
|
1686
|
-
|
|
1694
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1687
1695
|
], OAuthControllerHost.prototype, "passkeyRegistrationOptions", 1);
|
|
1688
|
-
|
|
1696
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1689
1697
|
_common.UseGuards.call(void 0, Guard),
|
|
1690
1698
|
_common.Post.call(void 0, "passkeys/register"),
|
|
1691
|
-
|
|
1692
|
-
|
|
1699
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1700
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Body.call(void 0, ))
|
|
1693
1701
|
], OAuthControllerHost.prototype, "passkeyRegister", 1);
|
|
1694
|
-
|
|
1702
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1695
1703
|
_common.UseGuards.call(void 0, Guard),
|
|
1696
1704
|
_common.Post.call(void 0, "passkeys/unlock/options"),
|
|
1697
|
-
|
|
1705
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1698
1706
|
], OAuthControllerHost.prototype, "passkeyUnlockOptions", 1);
|
|
1699
|
-
|
|
1707
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1700
1708
|
_common.UseGuards.call(void 0, Guard),
|
|
1701
1709
|
_common.Post.call(void 0, "passkeys/unlock"),
|
|
1702
|
-
|
|
1703
|
-
|
|
1710
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1711
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Body.call(void 0, ))
|
|
1704
1712
|
], OAuthControllerHost.prototype, "passkeyUnlock", 1);
|
|
1705
|
-
|
|
1713
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1706
1714
|
_common.UseGuards.call(void 0, Guard),
|
|
1707
1715
|
_common.Get.call(void 0, "passkeys"),
|
|
1708
|
-
|
|
1716
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, ))
|
|
1709
1717
|
], OAuthControllerHost.prototype, "listPasskeys", 1);
|
|
1710
|
-
|
|
1718
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1711
1719
|
_common.UseGuards.call(void 0, Guard),
|
|
1712
1720
|
_common.Delete.call(void 0, "passkeys/:id"),
|
|
1713
|
-
|
|
1714
|
-
|
|
1721
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _chunkD35TBVROcjs.CurrentUser.call(void 0, )),
|
|
1722
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Param.call(void 0, "id"))
|
|
1715
1723
|
], OAuthControllerHost.prototype, "deletePasskey", 1);
|
|
1716
|
-
|
|
1724
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1717
1725
|
_common.Post.call(void 0, "passkeys/login/options"),
|
|
1718
|
-
|
|
1726
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Body.call(void 0, ))
|
|
1719
1727
|
], OAuthControllerHost.prototype, "passkeyLoginOptions", 1);
|
|
1720
|
-
|
|
1728
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1721
1729
|
_common.Post.call(void 0, "passkeys/login"),
|
|
1722
|
-
|
|
1723
|
-
|
|
1730
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Body.call(void 0, )),
|
|
1731
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, { passthrough: true }))
|
|
1724
1732
|
], OAuthControllerHost.prototype, "passkeyLogin", 1);
|
|
1725
|
-
|
|
1733
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1726
1734
|
_common.Get.call(void 0, "magic-link/callback"),
|
|
1727
1735
|
_common.UseFilters.call(void 0, OAuthCallbackFilter),
|
|
1728
|
-
|
|
1729
|
-
|
|
1736
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Query.call(void 0, "token")),
|
|
1737
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, ))
|
|
1730
1738
|
], OAuthControllerHost.prototype, "magicLinkCallback", 1);
|
|
1731
|
-
|
|
1739
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1732
1740
|
_common.Get.call(void 0, ":provider"),
|
|
1733
|
-
|
|
1734
|
-
|
|
1741
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Param.call(void 0, "provider")),
|
|
1742
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Res.call(void 0, ))
|
|
1735
1743
|
], OAuthControllerHost.prototype, "start", 1);
|
|
1736
|
-
|
|
1744
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1737
1745
|
_common.Get.call(void 0, ":provider/callback"),
|
|
1738
1746
|
_common.UseFilters.call(void 0, OAuthCallbackFilter),
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1747
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Param.call(void 0, "provider")),
|
|
1748
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Query.call(void 0, )),
|
|
1749
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 2, _common.Req.call(void 0, )),
|
|
1750
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 3, _common.Res.call(void 0, ))
|
|
1743
1751
|
], OAuthControllerHost.prototype, "callback", 1);
|
|
1744
|
-
|
|
1752
|
+
_chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1745
1753
|
_common.Post.call(void 0, ":provider/callback"),
|
|
1746
1754
|
_common.UseFilters.call(void 0, OAuthCallbackFilter),
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1755
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Param.call(void 0, "provider")),
|
|
1756
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 1, _common.Body.call(void 0, )),
|
|
1757
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 2, _common.Req.call(void 0, )),
|
|
1758
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 3, _common.Res.call(void 0, ))
|
|
1751
1759
|
], OAuthControllerHost.prototype, "callbackByPost", 1);
|
|
1752
|
-
OAuthControllerHost =
|
|
1760
|
+
OAuthControllerHost = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1753
1761
|
_common.Controller.call(void 0, _nullishCoalesce(options.path, () => ( "auth"))),
|
|
1754
|
-
|
|
1762
|
+
_chunkLRX7AMSScjs.__decorateParam.call(void 0, 0, _common.Inject.call(void 0, OAuthAuthService))
|
|
1755
1763
|
], OAuthControllerHost);
|
|
1756
1764
|
return OAuthControllerHost;
|
|
1757
1765
|
}
|
|
@@ -1776,7 +1784,7 @@ var OAuthAuthModule = class {
|
|
|
1776
1784
|
};
|
|
1777
1785
|
}
|
|
1778
1786
|
};
|
|
1779
|
-
OAuthAuthModule = exports.OAuthAuthModule =
|
|
1787
|
+
OAuthAuthModule = exports.OAuthAuthModule = _chunkLRX7AMSScjs.__decorateClass.call(void 0, [
|
|
1780
1788
|
_common.Module.call(void 0, {})
|
|
1781
1789
|
], OAuthAuthModule);
|
|
1782
1790
|
|