@dereekb/firebase-server 13.12.2 → 13.12.4
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/index.cjs.js +86 -18
- package/index.esm.js +85 -19
- package/mailgun/index.cjs.js +6 -3
- package/mailgun/index.esm.js +6 -3
- package/mailgun/package.json +9 -9
- package/mcp/index.cjs.js +526 -183
- package/mcp/index.esm.js +527 -186
- package/mcp/package.json +12 -11
- package/mcp/src/lib/service/analytics/mcp.analytics.config.d.ts +5 -3
- package/mcp/src/lib/service/analytics/mcp.analytics.service.d.ts +3 -2
- package/mcp/src/lib/service/tools/mcp.tool.model-info.d.ts +90 -10
- package/model/package.json +9 -9
- package/oidc/index.cjs.js +116 -8
- package/oidc/index.esm.js +115 -10
- package/oidc/package.json +10 -10
- package/oidc/src/lib/oidc.config.d.ts +40 -2
- package/oidc/src/lib/oidc.module.d.ts +39 -2
- package/oidc/src/lib/service/oidc.client.service.d.ts +12 -4
- package/package.json +13 -10
- package/src/lib/auth/auth.service.d.ts +84 -17
- package/src/lib/env/env.service.d.ts +2 -2
- package/test/index.cjs.js +29 -0
- package/test/index.esm.js +29 -0
- package/test/package.json +11 -11
- package/test/src/lib/firebase/firebase.admin.auth.d.ts +22 -0
- package/twilio/package.json +8 -8
- package/zoho/package.json +9 -9
package/index.cjs.js
CHANGED
|
@@ -1256,15 +1256,6 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1256
1256
|
this.updateClaims(passwordClaimsData)
|
|
1257
1257
|
];
|
|
1258
1258
|
case 1:
|
|
1259
|
-
_state.sent();
|
|
1260
|
-
// update the user
|
|
1261
|
-
return [
|
|
1262
|
-
4,
|
|
1263
|
-
this.updateUser({
|
|
1264
|
-
password: password
|
|
1265
|
-
})
|
|
1266
|
-
];
|
|
1267
|
-
case 2:
|
|
1268
1259
|
_state.sent();
|
|
1269
1260
|
return [
|
|
1270
1261
|
2,
|
|
@@ -2123,6 +2114,50 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2123
2114
|
]);
|
|
2124
2115
|
return NoSetupContentFirebaseServerNewUserService;
|
|
2125
2116
|
}(AbstractFirebaseServerNewUserService);
|
|
2117
|
+
/**
|
|
2118
|
+
* Builds the composite oob code from a raw reset code (the numeric value stored in
|
|
2119
|
+
* {@link FirebaseServerAuthResetUserPasswordClaims.resetPassword}) and the target user's uid.
|
|
2120
|
+
*
|
|
2121
|
+
* @param uid - The target user's UID.
|
|
2122
|
+
* @param code - The raw reset code from the user's claims.
|
|
2123
|
+
*
|
|
2124
|
+
* @example
|
|
2125
|
+
* ```typescript
|
|
2126
|
+
* const oobCode = encodeFirebaseServerUserPasswordResetOobCode(user.uid, claims.resetPassword);
|
|
2127
|
+
* // e.g. '482910-abcDEF123'
|
|
2128
|
+
* ```
|
|
2129
|
+
*/ function encodeFirebaseServerUserPasswordResetOobCode(uid, code) {
|
|
2130
|
+
return "".concat(code, "-").concat(uid);
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Decodes a composite oob code back into its `{ uid, code }` parts. Returns `undefined`
|
|
2134
|
+
* when the token is malformed (missing separator, non-numeric code, empty uid).
|
|
2135
|
+
*
|
|
2136
|
+
* @param token - The composite oob token, typically received from the password-reset email.
|
|
2137
|
+
*
|
|
2138
|
+
* @example
|
|
2139
|
+
* ```typescript
|
|
2140
|
+
* const decoded = decodeFirebaseServerUserPasswordResetOobCode('482910-abcDEF123');
|
|
2141
|
+
* // decoded = { uid: 'abcDEF123', code: '482910' }
|
|
2142
|
+
* ```
|
|
2143
|
+
*/ function decodeFirebaseServerUserPasswordResetOobCode(token) {
|
|
2144
|
+
var result;
|
|
2145
|
+
if (typeof token === 'string') {
|
|
2146
|
+
var dashIndex = token.indexOf('-');
|
|
2147
|
+
if (dashIndex > 0 && dashIndex < token.length - 1) {
|
|
2148
|
+
var code = token.slice(0, dashIndex);
|
|
2149
|
+
var uid = token.slice(dashIndex + 1);
|
|
2150
|
+
// Code must be purely digits (matches DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR output).
|
|
2151
|
+
if (/^\d+$/.test(code)) {
|
|
2152
|
+
result = {
|
|
2153
|
+
uid: uid,
|
|
2154
|
+
code: code
|
|
2155
|
+
};
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
return result;
|
|
2160
|
+
}
|
|
2126
2161
|
/**
|
|
2127
2162
|
* Default throttle duration (60 seconds) between reset content re-sends to prevent spam while
|
|
2128
2163
|
* remaining responsive for legitimate users who didn't receive the first email.
|
|
@@ -2171,7 +2206,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2171
2206
|
key: "beginPasswordReset",
|
|
2172
2207
|
value: function beginPasswordReset(input) {
|
|
2173
2208
|
return _async_to_generator$g(function() {
|
|
2174
|
-
var uid, email, sendResetContent, sendResetDetailsOnce, sendResetIgnoreThrottle, sendResetThrowErrors, data, sendDetailsInTestEnvironment, resolvedUid, userRecord, userContext, claims;
|
|
2209
|
+
var uid, email, sendResetContent, sendResetDetailsOnce, sendResetIgnoreThrottle, sendResetThrowErrors, data, sendDetailsInTestEnvironment, resolvedUid, userRecord, userContext, claims, oobCode;
|
|
2175
2210
|
return _ts_generator$g(this, function(_state) {
|
|
2176
2211
|
switch(_state.label){
|
|
2177
2212
|
case 0:
|
|
@@ -2232,9 +2267,13 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2232
2267
|
_state.sent();
|
|
2233
2268
|
_state.label = 7;
|
|
2234
2269
|
case 7:
|
|
2270
|
+
oobCode = encodeFirebaseServerUserPasswordResetOobCode(resolvedUid, claims.resetPassword);
|
|
2235
2271
|
return [
|
|
2236
2272
|
2,
|
|
2237
|
-
|
|
2273
|
+
{
|
|
2274
|
+
claims: claims,
|
|
2275
|
+
oobCode: oobCode
|
|
2276
|
+
}
|
|
2238
2277
|
];
|
|
2239
2278
|
}
|
|
2240
2279
|
});
|
|
@@ -2380,6 +2419,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2380
2419
|
resetCommunicationAt: claims.resetCommunicationAt,
|
|
2381
2420
|
resetExpiresAt: claims.resetExpiresAt
|
|
2382
2421
|
},
|
|
2422
|
+
oobCode: encodeFirebaseServerUserPasswordResetOobCode(userContext.uid, claims.resetPassword),
|
|
2383
2423
|
data: config === null || config === void 0 ? void 0 : config.data,
|
|
2384
2424
|
sendDetailsInTestEnvironment: config === null || config === void 0 ? void 0 : config.sendDetailsInTestEnvironment
|
|
2385
2425
|
};
|
|
@@ -2422,30 +2462,56 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2422
2462
|
},
|
|
2423
2463
|
{
|
|
2424
2464
|
key: "completePasswordReset",
|
|
2425
|
-
value: function completePasswordReset(
|
|
2465
|
+
value: function completePasswordReset(input) {
|
|
2426
2466
|
return _async_to_generator$g(function() {
|
|
2427
|
-
var userContext, claims, storedCode, expiresAt, storedBuf, inputBuf;
|
|
2467
|
+
var decoded, userContext, claims, storedCode, expiresAt, storedBuf, inputBuf;
|
|
2428
2468
|
return _ts_generator$g(this, function(_state) {
|
|
2429
2469
|
switch(_state.label){
|
|
2430
2470
|
case 0:
|
|
2431
|
-
|
|
2471
|
+
// Decode the composite token. A malformed token is treated identically to every other
|
|
2472
|
+
// failure mode below — the caller cannot distinguish between "bad encoding", "unknown uid",
|
|
2473
|
+
// "no active reset", "expired", or "wrong code".
|
|
2474
|
+
decoded = decodeFirebaseServerUserPasswordResetOobCode(input.oobCode);
|
|
2475
|
+
if (!decoded) {
|
|
2476
|
+
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2477
|
+
}
|
|
2478
|
+
userContext = this.authService.userContext(decoded.uid);
|
|
2479
|
+
_state.label = 1;
|
|
2480
|
+
case 1:
|
|
2481
|
+
_state.trys.push([
|
|
2482
|
+
1,
|
|
2483
|
+
3,
|
|
2484
|
+
,
|
|
2485
|
+
4
|
|
2486
|
+
]);
|
|
2432
2487
|
return [
|
|
2433
2488
|
4,
|
|
2434
2489
|
userContext.loadResetPasswordClaims()
|
|
2435
2490
|
];
|
|
2436
|
-
case
|
|
2491
|
+
case 2:
|
|
2437
2492
|
claims = _state.sent();
|
|
2493
|
+
return [
|
|
2494
|
+
3,
|
|
2495
|
+
4
|
|
2496
|
+
];
|
|
2497
|
+
case 3:
|
|
2498
|
+
_state.sent();
|
|
2499
|
+
claims = undefined;
|
|
2500
|
+
return [
|
|
2501
|
+
3,
|
|
2502
|
+
4
|
|
2503
|
+
];
|
|
2504
|
+
case 4:
|
|
2438
2505
|
storedCode = claims === null || claims === void 0 ? void 0 : claims.resetPassword;
|
|
2439
2506
|
expiresAt = claims === null || claims === void 0 ? void 0 : claims.resetExpiresAt;
|
|
2440
2507
|
// Reject if no active reset OR the stored code is missing/wrong length OR the code is expired.
|
|
2441
|
-
|
|
2442
|
-
if (!storedCode || !expiresAt || storedCode.length !== input.resetPassword.length || new Date(expiresAt).getTime() <= Date.now()) {
|
|
2508
|
+
if (!storedCode || !expiresAt || storedCode.length !== decoded.code.length || new Date(expiresAt).getTime() <= Date.now()) {
|
|
2443
2509
|
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2444
2510
|
}
|
|
2445
2511
|
// Constant-time comparison to avoid leaking timing information about how many leading
|
|
2446
2512
|
// characters of the provided code matched. Lengths are equal per the guard above.
|
|
2447
2513
|
storedBuf = Buffer.from(storedCode);
|
|
2448
|
-
inputBuf = Buffer.from(
|
|
2514
|
+
inputBuf = Buffer.from(decoded.code);
|
|
2449
2515
|
if (!node_crypto.timingSafeEqual(storedBuf, inputBuf)) {
|
|
2450
2516
|
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2451
2517
|
}
|
|
@@ -12998,12 +13064,14 @@ exports.catchAndThrowPasswordResetServerErrors = catchAndThrowPasswordResetServe
|
|
|
12998
13064
|
exports.cloudEventHandlerWithNestContextFactory = cloudEventHandlerWithNestContextFactory;
|
|
12999
13065
|
exports.collectionRefForPath = collectionRefForPath;
|
|
13000
13066
|
exports.createModelUnknownModelTypeError = createModelUnknownModelTypeError;
|
|
13067
|
+
exports.decodeFirebaseServerUserPasswordResetOobCode = decodeFirebaseServerUserPasswordResetOobCode;
|
|
13001
13068
|
exports.defaultFirebaseServerActionsTransformFactoryLogErrorFunction = defaultFirebaseServerActionsTransformFactoryLogErrorFunction;
|
|
13002
13069
|
exports.defaultProvideFirebaseServerStorageServiceSimple = defaultProvideFirebaseServerStorageServiceSimple;
|
|
13003
13070
|
exports.deleteModelUnknownModelTypeError = deleteModelUnknownModelTypeError;
|
|
13004
13071
|
exports.developmentUnknownSpecifierError = developmentUnknownSpecifierError;
|
|
13005
13072
|
exports.docRefForPath = docRefForPath;
|
|
13006
13073
|
exports.documentModelNotAvailableError = documentModelNotAvailableError;
|
|
13074
|
+
exports.encodeFirebaseServerUserPasswordResetOobCode = encodeFirebaseServerUserPasswordResetOobCode;
|
|
13007
13075
|
exports.executeOnCallQuery = executeOnCallQuery;
|
|
13008
13076
|
exports.firebaseAuthTokenFromDecodedIdToken = firebaseAuthTokenFromDecodedIdToken;
|
|
13009
13077
|
exports.firebaseServerActionsContext = firebaseServerActionsContext;
|
package/index.esm.js
CHANGED
|
@@ -1254,15 +1254,6 @@ function _ts_generator$g(thisArg, body) {
|
|
|
1254
1254
|
this.updateClaims(passwordClaimsData)
|
|
1255
1255
|
];
|
|
1256
1256
|
case 1:
|
|
1257
|
-
_state.sent();
|
|
1258
|
-
// update the user
|
|
1259
|
-
return [
|
|
1260
|
-
4,
|
|
1261
|
-
this.updateUser({
|
|
1262
|
-
password: password
|
|
1263
|
-
})
|
|
1264
|
-
];
|
|
1265
|
-
case 2:
|
|
1266
1257
|
_state.sent();
|
|
1267
1258
|
return [
|
|
1268
1259
|
2,
|
|
@@ -2121,6 +2112,50 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2121
2112
|
]);
|
|
2122
2113
|
return NoSetupContentFirebaseServerNewUserService;
|
|
2123
2114
|
}(AbstractFirebaseServerNewUserService);
|
|
2115
|
+
/**
|
|
2116
|
+
* Builds the composite oob code from a raw reset code (the numeric value stored in
|
|
2117
|
+
* {@link FirebaseServerAuthResetUserPasswordClaims.resetPassword}) and the target user's uid.
|
|
2118
|
+
*
|
|
2119
|
+
* @param uid - The target user's UID.
|
|
2120
|
+
* @param code - The raw reset code from the user's claims.
|
|
2121
|
+
*
|
|
2122
|
+
* @example
|
|
2123
|
+
* ```typescript
|
|
2124
|
+
* const oobCode = encodeFirebaseServerUserPasswordResetOobCode(user.uid, claims.resetPassword);
|
|
2125
|
+
* // e.g. '482910-abcDEF123'
|
|
2126
|
+
* ```
|
|
2127
|
+
*/ function encodeFirebaseServerUserPasswordResetOobCode(uid, code) {
|
|
2128
|
+
return "".concat(code, "-").concat(uid);
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Decodes a composite oob code back into its `{ uid, code }` parts. Returns `undefined`
|
|
2132
|
+
* when the token is malformed (missing separator, non-numeric code, empty uid).
|
|
2133
|
+
*
|
|
2134
|
+
* @param token - The composite oob token, typically received from the password-reset email.
|
|
2135
|
+
*
|
|
2136
|
+
* @example
|
|
2137
|
+
* ```typescript
|
|
2138
|
+
* const decoded = decodeFirebaseServerUserPasswordResetOobCode('482910-abcDEF123');
|
|
2139
|
+
* // decoded = { uid: 'abcDEF123', code: '482910' }
|
|
2140
|
+
* ```
|
|
2141
|
+
*/ function decodeFirebaseServerUserPasswordResetOobCode(token) {
|
|
2142
|
+
var result;
|
|
2143
|
+
if (typeof token === 'string') {
|
|
2144
|
+
var dashIndex = token.indexOf('-');
|
|
2145
|
+
if (dashIndex > 0 && dashIndex < token.length - 1) {
|
|
2146
|
+
var code = token.slice(0, dashIndex);
|
|
2147
|
+
var uid = token.slice(dashIndex + 1);
|
|
2148
|
+
// Code must be purely digits (matches DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR output).
|
|
2149
|
+
if (/^\d+$/.test(code)) {
|
|
2150
|
+
result = {
|
|
2151
|
+
uid: uid,
|
|
2152
|
+
code: code
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
return result;
|
|
2158
|
+
}
|
|
2124
2159
|
/**
|
|
2125
2160
|
* Default throttle duration (60 seconds) between reset content re-sends to prevent spam while
|
|
2126
2161
|
* remaining responsive for legitimate users who didn't receive the first email.
|
|
@@ -2169,7 +2204,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2169
2204
|
key: "beginPasswordReset",
|
|
2170
2205
|
value: function beginPasswordReset(input) {
|
|
2171
2206
|
return _async_to_generator$g(function() {
|
|
2172
|
-
var uid, email, sendResetContent, sendResetDetailsOnce, sendResetIgnoreThrottle, sendResetThrowErrors, data, sendDetailsInTestEnvironment, resolvedUid, userRecord, userContext, claims;
|
|
2207
|
+
var uid, email, sendResetContent, sendResetDetailsOnce, sendResetIgnoreThrottle, sendResetThrowErrors, data, sendDetailsInTestEnvironment, resolvedUid, userRecord, userContext, claims, oobCode;
|
|
2173
2208
|
return _ts_generator$g(this, function(_state) {
|
|
2174
2209
|
switch(_state.label){
|
|
2175
2210
|
case 0:
|
|
@@ -2230,9 +2265,13 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2230
2265
|
_state.sent();
|
|
2231
2266
|
_state.label = 7;
|
|
2232
2267
|
case 7:
|
|
2268
|
+
oobCode = encodeFirebaseServerUserPasswordResetOobCode(resolvedUid, claims.resetPassword);
|
|
2233
2269
|
return [
|
|
2234
2270
|
2,
|
|
2235
|
-
|
|
2271
|
+
{
|
|
2272
|
+
claims: claims,
|
|
2273
|
+
oobCode: oobCode
|
|
2274
|
+
}
|
|
2236
2275
|
];
|
|
2237
2276
|
}
|
|
2238
2277
|
});
|
|
@@ -2378,6 +2417,7 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2378
2417
|
resetCommunicationAt: claims.resetCommunicationAt,
|
|
2379
2418
|
resetExpiresAt: claims.resetExpiresAt
|
|
2380
2419
|
},
|
|
2420
|
+
oobCode: encodeFirebaseServerUserPasswordResetOobCode(userContext.uid, claims.resetPassword),
|
|
2381
2421
|
data: config === null || config === void 0 ? void 0 : config.data,
|
|
2382
2422
|
sendDetailsInTestEnvironment: config === null || config === void 0 ? void 0 : config.sendDetailsInTestEnvironment
|
|
2383
2423
|
};
|
|
@@ -2420,30 +2460,56 @@ function _ts_generator$g(thisArg, body) {
|
|
|
2420
2460
|
},
|
|
2421
2461
|
{
|
|
2422
2462
|
key: "completePasswordReset",
|
|
2423
|
-
value: function completePasswordReset(
|
|
2463
|
+
value: function completePasswordReset(input) {
|
|
2424
2464
|
return _async_to_generator$g(function() {
|
|
2425
|
-
var userContext, claims, storedCode, expiresAt, storedBuf, inputBuf;
|
|
2465
|
+
var decoded, userContext, claims, storedCode, expiresAt, storedBuf, inputBuf;
|
|
2426
2466
|
return _ts_generator$g(this, function(_state) {
|
|
2427
2467
|
switch(_state.label){
|
|
2428
2468
|
case 0:
|
|
2429
|
-
|
|
2469
|
+
// Decode the composite token. A malformed token is treated identically to every other
|
|
2470
|
+
// failure mode below — the caller cannot distinguish between "bad encoding", "unknown uid",
|
|
2471
|
+
// "no active reset", "expired", or "wrong code".
|
|
2472
|
+
decoded = decodeFirebaseServerUserPasswordResetOobCode(input.oobCode);
|
|
2473
|
+
if (!decoded) {
|
|
2474
|
+
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2475
|
+
}
|
|
2476
|
+
userContext = this.authService.userContext(decoded.uid);
|
|
2477
|
+
_state.label = 1;
|
|
2478
|
+
case 1:
|
|
2479
|
+
_state.trys.push([
|
|
2480
|
+
1,
|
|
2481
|
+
3,
|
|
2482
|
+
,
|
|
2483
|
+
4
|
|
2484
|
+
]);
|
|
2430
2485
|
return [
|
|
2431
2486
|
4,
|
|
2432
2487
|
userContext.loadResetPasswordClaims()
|
|
2433
2488
|
];
|
|
2434
|
-
case
|
|
2489
|
+
case 2:
|
|
2435
2490
|
claims = _state.sent();
|
|
2491
|
+
return [
|
|
2492
|
+
3,
|
|
2493
|
+
4
|
|
2494
|
+
];
|
|
2495
|
+
case 3:
|
|
2496
|
+
_state.sent();
|
|
2497
|
+
claims = undefined;
|
|
2498
|
+
return [
|
|
2499
|
+
3,
|
|
2500
|
+
4
|
|
2501
|
+
];
|
|
2502
|
+
case 4:
|
|
2436
2503
|
storedCode = claims === null || claims === void 0 ? void 0 : claims.resetPassword;
|
|
2437
2504
|
expiresAt = claims === null || claims === void 0 ? void 0 : claims.resetExpiresAt;
|
|
2438
2505
|
// Reject if no active reset OR the stored code is missing/wrong length OR the code is expired.
|
|
2439
|
-
|
|
2440
|
-
if (!storedCode || !expiresAt || storedCode.length !== input.resetPassword.length || new Date(expiresAt).getTime() <= Date.now()) {
|
|
2506
|
+
if (!storedCode || !expiresAt || storedCode.length !== decoded.code.length || new Date(expiresAt).getTime() <= Date.now()) {
|
|
2441
2507
|
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2442
2508
|
}
|
|
2443
2509
|
// Constant-time comparison to avoid leaking timing information about how many leading
|
|
2444
2510
|
// characters of the provided code matched. Lengths are equal per the guard above.
|
|
2445
2511
|
storedBuf = Buffer.from(storedCode);
|
|
2446
|
-
inputBuf = Buffer.from(
|
|
2512
|
+
inputBuf = Buffer.from(decoded.code);
|
|
2447
2513
|
if (!timingSafeEqual(storedBuf, inputBuf)) {
|
|
2448
2514
|
throw new FirebaseServerAuthPasswordResetInvalidCodeError();
|
|
2449
2515
|
}
|
|
@@ -12914,4 +12980,4 @@ function _define_property(obj, key, value) {
|
|
|
12914
12980
|
}
|
|
12915
12981
|
();
|
|
12916
12982
|
|
|
12917
|
-
export { AbstractFirebaseNestContext, AbstractFirebaseServerActionsContext, AbstractFirebaseServerAuthContext, AbstractFirebaseServerAuthService, AbstractFirebaseServerAuthUserContext, AbstractFirebaseServerNewUserService, AbstractFirebaseServerUserPasswordResetService, AbstractNestContext, AbstractServerFirebaseNestContext, ConfigureFirebaseAppCheckMiddlewareModule, ConfigureFirebaseWebhookMiddlewareModule, DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR, DEFAULT_RESET_CODE_EXPIRES_IN, DEFAULT_RESET_COM_THROTTLE_TIME, DEFAULT_SERVER_ASSETS_BASE_PATH, DEFAULT_SETUP_COM_THROTTLE_TIME, DefaultFirebaseServerEnvService, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_CONTEXT_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_SERVER_ENV_TOKEN, FIREBASE_SERVER_VALIDATION_ERROR_CODE, FIREBASE_STORAGE_CONTEXT_FACTORY_CONFIG_TOKEN, FIREBASE_STORAGE_CONTEXT_TOKEN, FIREBASE_STORAGE_TOKEN, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FirebaseAppCheckMiddleware, FirebaseAppCheckMiddlewareConfig, FirebaseNestServerRootModule, FirebaseRawBodyMiddleware, FirebaseServerAnalyticsSegmentListenerService, FirebaseServerAnalyticsSegmentModule, FirebaseServerAnalyticsService, FirebaseServerAnalyticsServiceListener, FirebaseServerAuthModule, FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError, FirebaseServerAuthNewUserSendSetupDetailsSendOnceError, FirebaseServerAuthNewUserSendSetupDetailsThrottleError, FirebaseServerAuthPasswordResetInvalidCodeError, FirebaseServerAuthPasswordResetNoResetConfigError, FirebaseServerAuthPasswordResetSendOnceError, FirebaseServerAuthPasswordResetThrottleError, FirebaseServerAuthService, FirebaseServerAuthUserBadInputError, FirebaseServerAuthUserExistsError, FirebaseServerEnvService, FirebaseServerFirestoreContextModule, FirebaseServerFirestoreModule, FirebaseServerStorageContextModule, FirebaseServerStorageModule, FirebaseServerStorageService, GlobalRoutePrefixConfig, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MODEL_API_NEST_APPLICATION_CONTEXT, ModelApiCallModelDispatchService, ModelApiController, ModelApiDispatchConfig, ModelApiGetService, NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE, NoContentFirebaseServerUserPasswordResetService, NoSetupContentFirebaseServerNewUserService, ON_CALL_MODEL_ANALYTICS_HANDLER, ON_CALL_MODEL_ANALYTICS_SERVICE, OnCallModelAnalyticsService, PHONE_NUMBER_ALREADY_EXISTS_ERROR_CODE, SkipAppCheck, UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE, UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE, _onCallWithCallTypeFunction, aggregateCrudModelApiDetails, aggregateModelApiDetails, aggregateSpecifierApiDetails, alreadyExistsError, appAnalyticsModuleMetadata, appFirestoreModuleMetadata, assertContextHasAuth, assertDocumentExists, assertHasRolesInRequest, assertHasSignedTosInRequest, assertIsAdminInRequest, assertIsAdminOrTargetUserInRequestData, assertIsContextWithAuthData, assertRequestRequiresAuthForFunction, assertSnapshotData, assertSnapshotDataWithKey, authServicePasswordResetInvalidCodeError, authServicePasswordResetNoConfigError, authServicePasswordResetSendOnceError, authServicePasswordResetThrottleError, badRequestError, blockingFunctionHandlerWithNestContextFactory, buildNestServerRootModule, callWithAnalytics, catchAndThrowPasswordResetServerErrors, cloudEventHandlerWithNestContextFactory, collectionRefForPath, createModelUnknownModelTypeError, defaultFirebaseServerActionsTransformFactoryLogErrorFunction, defaultProvideFirebaseServerStorageServiceSimple, deleteModelUnknownModelTypeError, developmentUnknownSpecifierError, docRefForPath, documentModelNotAvailableError, executeOnCallQuery, firebaseAuthTokenFromDecodedIdToken, firebaseServerActionsContext, firebaseServerActionsTransformContext, firebaseServerActionsTransformFactory, firebaseServerAppTokenProvider, firebaseServerAuthModuleMetadata, firebaseServerDevFunctions, firebaseServerEnvTokenProvider, firebaseServerEnvTokenProviders, firebaseServerErrorInfo, firebaseServerErrorInfoCodePair, firebaseServerErrorInfoServerErrorCodePair, firebaseServerErrorInfoServerErrorPair, firebaseServerFirestoreContextModuleMetadata, firebaseServerStorageDefaultBucketIdTokenProvider, firebaseServerStorageModuleMetadata, firebaseServerValidationError, firebaseServerValidationServerError, firestoreClientQueryConstraintFunctionsDriver, firestoreEncryptedField, firestoreServerIncrementUpdateToUpdateData, forbiddenError, getAuthUserOrUndefined, getModelApiDetails, googleCloudFileMetadataToStorageMetadata, googleCloudFirebaseStorageContextFactory, googleCloudFirebaseStorageDrivers, googleCloudFirestoreAccessorDriver, googleCloudFirestoreContextFactory, googleCloudFirestoreDrivers, googleCloudFirestoreQueryDriver, googleCloudStorageAccessorFile, googleCloudStorageAccessorFolder, googleCloudStorageBucketForStorageFilePath, googleCloudStorageFileForStorageFilePath, googleCloudStorageFirebaseStorageAccessorDriver, googleCloudStorageFromFirebaseAdminStorage, googleCloudStorageListFilesResultFactory, handleFirebaseAuthError, handleFirebaseError, hasAuthRolesInRequest, hasNewUserSetupPasswordInRequest, hasSignedTosInRequest, inAuthContext, injectNestApplicationContextIntoRequest, injectNestIntoRequest, internalServerError, invokeModelUnknownModelTypeError, isActualSpecifier, isAdminInRequest, isAdminOrTargetUserInRequestData, isContextWithAuthData, isFirebaseError, isFirebaseHttpsError, isOnCallCrudModelApiDetails, isOnCallHandlerApiDetails, isOnCallModelTypeApiDetails, isOnCallSpecifierApiDetails, makeBlockingFunctionWithHandler, makeOnScheduleHandlerWithNestApplicationRequest, makeScheduledFunctionDevelopmentFunction, modelAccessReadErrorFromUseMultipleModelsFailure, modelApiModuleMetadata, modelNotAvailableError, nestAppHasDevelopmentSchedulerEnabled, nestAppIsProductionEnvironment, nestFirebaseDoesNotExistError, nestFirebaseForbiddenPermissionError, nestServerInstance, noRunNameSpecifiedForScheduledFunctionDevelopmentFunction, noopFirebaseServerAnalyticsServiceListener, noopOnCallModelAnalyticsService, notFoundError, onCallAnalyticsEmitterInstance, onCallCreateModel, onCallDeleteModel, onCallDevelopmentFunction, onCallHandlerWithNestApplicationFactory, onCallHandlerWithNestContextFactory, onCallInvokeModel, onCallModel, onCallModelMissingCallTypeError, onCallModelUnknownCallTypeError, onCallQueryModel, onCallReadModel, onCallSpecifierHandler, onCallUpdateModel, onScheduleHandlerWithNestApplicationFactory, onScheduleHandlerWithNestContextFactory, optionalAuthContext, optionalFirestoreEncryptedField, permissionDeniedError, phoneNumberAlreadyExistsError, preconditionConflictError, provideAppFirestoreCollections, provideFirebaseServerAuthService, provideFirebaseServerStorageService, queryModelBadCursorError, queryModelUnknownModelTypeError, readApiDetails, readModelUnknownModelTypeError, resolveAdminOnlyValue, resolveAnalyticsFromApiDetails, setNestContextOnRequest, setNestContextOnScheduleRequest, taskQueueFunctionHandlerWithNestContextFactory, unauthenticatedContextHasNoAuthData, unauthenticatedContextHasNoUidError, unauthenticatedError, unavailableError, unavailableOrDeactivatedFunctionError, unknownModelCrudFunctionSpecifierError, unknownScheduledFunctionDevelopmentFunctionName, unknownScheduledFunctionDevelopmentFunctionType, updateModelUnknownModelTypeError, userContextFromUid, verifyAppCheckInRequest, withApiDetails };
|
|
12983
|
+
export { AbstractFirebaseNestContext, AbstractFirebaseServerActionsContext, AbstractFirebaseServerAuthContext, AbstractFirebaseServerAuthService, AbstractFirebaseServerAuthUserContext, AbstractFirebaseServerNewUserService, AbstractFirebaseServerUserPasswordResetService, AbstractNestContext, AbstractServerFirebaseNestContext, ConfigureFirebaseAppCheckMiddlewareModule, ConfigureFirebaseWebhookMiddlewareModule, DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR, DEFAULT_RESET_CODE_EXPIRES_IN, DEFAULT_RESET_COM_THROTTLE_TIME, DEFAULT_SERVER_ASSETS_BASE_PATH, DEFAULT_SETUP_COM_THROTTLE_TIME, DefaultFirebaseServerEnvService, FIREBASE_APP_TOKEN, FIREBASE_AUTH_TOKEN, FIREBASE_FIRESTORE_CONTEXT_TOKEN, FIREBASE_FIRESTORE_TOKEN, FIREBASE_SERVER_ENV_TOKEN, FIREBASE_SERVER_VALIDATION_ERROR_CODE, FIREBASE_STORAGE_CONTEXT_FACTORY_CONFIG_TOKEN, FIREBASE_STORAGE_CONTEXT_TOKEN, FIREBASE_STORAGE_TOKEN, FIRESTORE_CLIENT_QUERY_CONSTRAINT_HANDLER_MAPPING, FirebaseAppCheckMiddleware, FirebaseAppCheckMiddlewareConfig, FirebaseNestServerRootModule, FirebaseRawBodyMiddleware, FirebaseServerAnalyticsSegmentListenerService, FirebaseServerAnalyticsSegmentModule, FirebaseServerAnalyticsService, FirebaseServerAnalyticsServiceListener, FirebaseServerAuthModule, FirebaseServerAuthNewUserSendSetupDetailsNoSetupConfigError, FirebaseServerAuthNewUserSendSetupDetailsSendOnceError, FirebaseServerAuthNewUserSendSetupDetailsThrottleError, FirebaseServerAuthPasswordResetInvalidCodeError, FirebaseServerAuthPasswordResetNoResetConfigError, FirebaseServerAuthPasswordResetSendOnceError, FirebaseServerAuthPasswordResetThrottleError, FirebaseServerAuthService, FirebaseServerAuthUserBadInputError, FirebaseServerAuthUserExistsError, FirebaseServerEnvService, FirebaseServerFirestoreContextModule, FirebaseServerFirestoreModule, FirebaseServerStorageContextModule, FirebaseServerStorageModule, FirebaseServerStorageService, GlobalRoutePrefixConfig, MAX_MODEL_ACCESS_MULTI_READ_KEYS, MODEL_API_NEST_APPLICATION_CONTEXT, ModelApiCallModelDispatchService, ModelApiController, ModelApiDispatchConfig, ModelApiGetService, NO_RUN_NAME_SPECIFIED_FOR_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_CODE, NoContentFirebaseServerUserPasswordResetService, NoSetupContentFirebaseServerNewUserService, ON_CALL_MODEL_ANALYTICS_HANDLER, ON_CALL_MODEL_ANALYTICS_SERVICE, OnCallModelAnalyticsService, PHONE_NUMBER_ALREADY_EXISTS_ERROR_CODE, SkipAppCheck, UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_NAME_CODE, UNKNOWN_SCHEDULED_FUNCTION_DEVELOPMENT_FUNCTION_TYPE_CODE, _onCallWithCallTypeFunction, aggregateCrudModelApiDetails, aggregateModelApiDetails, aggregateSpecifierApiDetails, alreadyExistsError, appAnalyticsModuleMetadata, appFirestoreModuleMetadata, assertContextHasAuth, assertDocumentExists, assertHasRolesInRequest, assertHasSignedTosInRequest, assertIsAdminInRequest, assertIsAdminOrTargetUserInRequestData, assertIsContextWithAuthData, assertRequestRequiresAuthForFunction, assertSnapshotData, assertSnapshotDataWithKey, authServicePasswordResetInvalidCodeError, authServicePasswordResetNoConfigError, authServicePasswordResetSendOnceError, authServicePasswordResetThrottleError, badRequestError, blockingFunctionHandlerWithNestContextFactory, buildNestServerRootModule, callWithAnalytics, catchAndThrowPasswordResetServerErrors, cloudEventHandlerWithNestContextFactory, collectionRefForPath, createModelUnknownModelTypeError, decodeFirebaseServerUserPasswordResetOobCode, defaultFirebaseServerActionsTransformFactoryLogErrorFunction, defaultProvideFirebaseServerStorageServiceSimple, deleteModelUnknownModelTypeError, developmentUnknownSpecifierError, docRefForPath, documentModelNotAvailableError, encodeFirebaseServerUserPasswordResetOobCode, executeOnCallQuery, firebaseAuthTokenFromDecodedIdToken, firebaseServerActionsContext, firebaseServerActionsTransformContext, firebaseServerActionsTransformFactory, firebaseServerAppTokenProvider, firebaseServerAuthModuleMetadata, firebaseServerDevFunctions, firebaseServerEnvTokenProvider, firebaseServerEnvTokenProviders, firebaseServerErrorInfo, firebaseServerErrorInfoCodePair, firebaseServerErrorInfoServerErrorCodePair, firebaseServerErrorInfoServerErrorPair, firebaseServerFirestoreContextModuleMetadata, firebaseServerStorageDefaultBucketIdTokenProvider, firebaseServerStorageModuleMetadata, firebaseServerValidationError, firebaseServerValidationServerError, firestoreClientQueryConstraintFunctionsDriver, firestoreEncryptedField, firestoreServerIncrementUpdateToUpdateData, forbiddenError, getAuthUserOrUndefined, getModelApiDetails, googleCloudFileMetadataToStorageMetadata, googleCloudFirebaseStorageContextFactory, googleCloudFirebaseStorageDrivers, googleCloudFirestoreAccessorDriver, googleCloudFirestoreContextFactory, googleCloudFirestoreDrivers, googleCloudFirestoreQueryDriver, googleCloudStorageAccessorFile, googleCloudStorageAccessorFolder, googleCloudStorageBucketForStorageFilePath, googleCloudStorageFileForStorageFilePath, googleCloudStorageFirebaseStorageAccessorDriver, googleCloudStorageFromFirebaseAdminStorage, googleCloudStorageListFilesResultFactory, handleFirebaseAuthError, handleFirebaseError, hasAuthRolesInRequest, hasNewUserSetupPasswordInRequest, hasSignedTosInRequest, inAuthContext, injectNestApplicationContextIntoRequest, injectNestIntoRequest, internalServerError, invokeModelUnknownModelTypeError, isActualSpecifier, isAdminInRequest, isAdminOrTargetUserInRequestData, isContextWithAuthData, isFirebaseError, isFirebaseHttpsError, isOnCallCrudModelApiDetails, isOnCallHandlerApiDetails, isOnCallModelTypeApiDetails, isOnCallSpecifierApiDetails, makeBlockingFunctionWithHandler, makeOnScheduleHandlerWithNestApplicationRequest, makeScheduledFunctionDevelopmentFunction, modelAccessReadErrorFromUseMultipleModelsFailure, modelApiModuleMetadata, modelNotAvailableError, nestAppHasDevelopmentSchedulerEnabled, nestAppIsProductionEnvironment, nestFirebaseDoesNotExistError, nestFirebaseForbiddenPermissionError, nestServerInstance, noRunNameSpecifiedForScheduledFunctionDevelopmentFunction, noopFirebaseServerAnalyticsServiceListener, noopOnCallModelAnalyticsService, notFoundError, onCallAnalyticsEmitterInstance, onCallCreateModel, onCallDeleteModel, onCallDevelopmentFunction, onCallHandlerWithNestApplicationFactory, onCallHandlerWithNestContextFactory, onCallInvokeModel, onCallModel, onCallModelMissingCallTypeError, onCallModelUnknownCallTypeError, onCallQueryModel, onCallReadModel, onCallSpecifierHandler, onCallUpdateModel, onScheduleHandlerWithNestApplicationFactory, onScheduleHandlerWithNestContextFactory, optionalAuthContext, optionalFirestoreEncryptedField, permissionDeniedError, phoneNumberAlreadyExistsError, preconditionConflictError, provideAppFirestoreCollections, provideFirebaseServerAuthService, provideFirebaseServerStorageService, queryModelBadCursorError, queryModelUnknownModelTypeError, readApiDetails, readModelUnknownModelTypeError, resolveAdminOnlyValue, resolveAnalyticsFromApiDetails, setNestContextOnRequest, setNestContextOnScheduleRequest, taskQueueFunctionHandlerWithNestContextFactory, unauthenticatedContextHasNoAuthData, unauthenticatedContextHasNoUidError, unauthenticatedError, unavailableError, unavailableOrDeactivatedFunctionError, unknownModelCrudFunctionSpecifierError, unknownScheduledFunctionDevelopmentFunctionName, unknownScheduledFunctionDevelopmentFunctionType, updateModelUnknownModelTypeError, userContextFromUid, verifyAppCheckInRequest, withApiDetails };
|
package/mailgun/index.cjs.js
CHANGED
|
@@ -374,7 +374,7 @@ function _ts_generator(thisArg, body) {
|
|
|
374
374
|
key: "sendPasswordResetContentToUser",
|
|
375
375
|
value: function sendPasswordResetContentToUser(details) {
|
|
376
376
|
return _async_to_generator(function() {
|
|
377
|
-
var userRecord,
|
|
377
|
+
var userRecord, oobCode, uid, displayName, email, baseRequest, baseRequestTo;
|
|
378
378
|
return _ts_generator(this, function(_state) {
|
|
379
379
|
switch(_state.label){
|
|
380
380
|
case 0:
|
|
@@ -384,7 +384,10 @@ function _ts_generator(thisArg, body) {
|
|
|
384
384
|
];
|
|
385
385
|
case 1:
|
|
386
386
|
userRecord = _state.sent();
|
|
387
|
-
|
|
387
|
+
// Inject the encoded oob code (carries both the raw code and the target uid) so the link
|
|
388
|
+
// embedded in the email is self-sufficient — the recipient does not need to be signed in
|
|
389
|
+
// to complete the reset.
|
|
390
|
+
oobCode = details.oobCode;
|
|
388
391
|
uid = userRecord.uid, displayName = userRecord.displayName, email = userRecord.email;
|
|
389
392
|
if (!email) {
|
|
390
393
|
throw new Error('Email is not present/available for the user record "'.concat(userRecord.uid, '"'));
|
|
@@ -405,7 +408,7 @@ function _ts_generator(thisArg, body) {
|
|
|
405
408
|
name: baseRequestTo === null || baseRequestTo === void 0 ? void 0 : baseRequestTo.name,
|
|
406
409
|
email: email,
|
|
407
410
|
userVariables: _object_spread_props(_object_spread({
|
|
408
|
-
resetPassword:
|
|
411
|
+
resetPassword: oobCode
|
|
409
412
|
}, baseRequestTo === null || baseRequestTo === void 0 ? void 0 : baseRequestTo.userVariables), {
|
|
410
413
|
displayName: displayName,
|
|
411
414
|
uid: uid
|
package/mailgun/index.esm.js
CHANGED
|
@@ -372,7 +372,7 @@ function _ts_generator(thisArg, body) {
|
|
|
372
372
|
key: "sendPasswordResetContentToUser",
|
|
373
373
|
value: function sendPasswordResetContentToUser(details) {
|
|
374
374
|
return _async_to_generator(function() {
|
|
375
|
-
var userRecord,
|
|
375
|
+
var userRecord, oobCode, uid, displayName, email, baseRequest, baseRequestTo;
|
|
376
376
|
return _ts_generator(this, function(_state) {
|
|
377
377
|
switch(_state.label){
|
|
378
378
|
case 0:
|
|
@@ -382,7 +382,10 @@ function _ts_generator(thisArg, body) {
|
|
|
382
382
|
];
|
|
383
383
|
case 1:
|
|
384
384
|
userRecord = _state.sent();
|
|
385
|
-
|
|
385
|
+
// Inject the encoded oob code (carries both the raw code and the target uid) so the link
|
|
386
|
+
// embedded in the email is self-sufficient — the recipient does not need to be signed in
|
|
387
|
+
// to complete the reset.
|
|
388
|
+
oobCode = details.oobCode;
|
|
386
389
|
uid = userRecord.uid, displayName = userRecord.displayName, email = userRecord.email;
|
|
387
390
|
if (!email) {
|
|
388
391
|
throw new Error('Email is not present/available for the user record "'.concat(userRecord.uid, '"'));
|
|
@@ -403,7 +406,7 @@ function _ts_generator(thisArg, body) {
|
|
|
403
406
|
name: baseRequestTo === null || baseRequestTo === void 0 ? void 0 : baseRequestTo.name,
|
|
404
407
|
email: email,
|
|
405
408
|
userVariables: _object_spread_props(_object_spread({
|
|
406
|
-
resetPassword:
|
|
409
|
+
resetPassword: oobCode
|
|
407
410
|
}, baseRequestTo === null || baseRequestTo === void 0 ? void 0 : baseRequestTo.userVariables), {
|
|
408
411
|
displayName: displayName,
|
|
409
412
|
uid: uid
|
package/mailgun/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/firebase-server/mailgun",
|
|
3
|
-
"version": "13.12.
|
|
3
|
+
"version": "13.12.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@dereekb/analytics": "13.12.
|
|
6
|
-
"@dereekb/firebase": "13.12.
|
|
7
|
-
"@dereekb/firebase-server": "13.12.
|
|
8
|
-
"@dereekb/date": "13.12.
|
|
9
|
-
"@dereekb/nestjs": "13.12.
|
|
10
|
-
"@dereekb/model": "13.12.
|
|
11
|
-
"@dereekb/rxjs": "13.12.
|
|
12
|
-
"@dereekb/util": "13.12.
|
|
5
|
+
"@dereekb/analytics": "13.12.4",
|
|
6
|
+
"@dereekb/firebase": "13.12.4",
|
|
7
|
+
"@dereekb/firebase-server": "13.12.4",
|
|
8
|
+
"@dereekb/date": "13.12.4",
|
|
9
|
+
"@dereekb/nestjs": "13.12.4",
|
|
10
|
+
"@dereekb/model": "13.12.4",
|
|
11
|
+
"@dereekb/rxjs": "13.12.4",
|
|
12
|
+
"@dereekb/util": "13.12.4"
|
|
13
13
|
},
|
|
14
14
|
"exports": {
|
|
15
15
|
"./package.json": "./package.json",
|