Skip to content

Commit 3d56ce5

Browse files
authored
Merge pull request #18538 from mozilla/FXA-11272
task(customs): Update rules for consistency
2 parents e587081 + 0e969ae commit 3d56ce5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libs/accounts/recovery-phone/src/lib/recovery-phone.manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
import { Redis } from 'ioredis';
2323
import { PhoneNumberInstance } from 'twilio/lib/rest/lookups/v2/phoneNumber';
2424

25-
const RECORD_EXPIRATION_SECONDS = 10 * 60;
25+
const RECORD_EXPIRATION_SECONDS = 5 * 60;
2626

2727
/**
2828
*

packages/fxa-customs-server/lib/config/config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ module.exports = function (fs, path, url, convict) {
195195
},
196196
passwordResetOtpRateLimitIntervalSeconds: {
197197
doc: 'Number of seconds to wait until password reset OTP requests are allowed again',
198-
default: 1800,
198+
default: 15 * 60,
199199
format: 'nat',
200200
env: 'PASSWORD_RESET_OTP_EMAIL_RATE_LIMIT_SECONDS',
201201
},
@@ -431,7 +431,7 @@ module.exports = function (fs, path, url, convict) {
431431
max: {
432432
doc: 'max actions during `period` that can occur before rate limit is applied',
433433
format: 'nat',
434-
default: 2,
434+
default: 5,
435435
env: 'TOTP_CODE_RULE_MAX',
436436
},
437437
periodMs: {
@@ -443,7 +443,7 @@ module.exports = function (fs, path, url, convict) {
443443
rateLimitIntervalMs: {
444444
doc: 'how long rate limit is applied',
445445
format: 'duration',
446-
default: '30 seconds',
446+
default: '15 minutes',
447447
env: 'TOTP_CODE_RULE_LIMIT_INTERVAL_MS',
448448
},
449449
},
@@ -458,13 +458,13 @@ module.exports = function (fs, path, url, convict) {
458458
max: {
459459
doc: 'max actions during `period` that can occur before rate limit is applied',
460460
format: 'nat',
461-
default: 10,
461+
default: 5,
462462
env: 'RECOVERY_PHONE_TOTP_CODE_RULE_MAX',
463463
},
464464
periodMs: {
465465
doc: 'period needed before rate limit is reset',
466466
format: 'duration',
467-
default: '15 minutes',
467+
default: '5 minutes',
468468
env: 'RECOVERY_PHONE_TOTP_CODE_RULE_PERIOD_MS',
469469
},
470470
rateLimitIntervalMs: {

0 commit comments

Comments
 (0)