@@ -4,38 +4,38 @@ This guide outlines recommended best practices for designing and deploying such
44
551 . Add reCAPTCHA to the flow initiation step
66
7- - Before sending an OTP or recovery code, require reCAPTCHA verification to block bots and brute-force attempts.
8- - Apply reCAPTCHA to:
9- - Forgot Password initiation
10- - Resend recovery code endpoints
11- - reCAPTCHA protects against automated SMS/email flooding and username enumeration.
7+ - Before sending an OTP or recovery code, require reCAPTCHA verification to block bots and brute-force attempts.
8+ - Apply reCAPTCHA to:
9+ - Forgot Password initiation
10+ - Resend recovery code endpoints
11+ - reCAPTCHA protects against automated SMS/email flooding and username enumeration.
1212
13132 . Prevent username enumeration
1414
15- - Ensure API responses didn't reveal whether an account exists.
16- - Use a generic message such as: "If the provided username is valid, an OTP will be sent to the registered email address or phone number."
17- - Return the same response for valid and invalid usernames to avoid revealing account existence.
15+ - Ensure API responses didn't reveal whether an account exists.
16+ - Use a generic message such as: "If the provided username is valid, an OTP will be sent to the registered email address or phone number."
17+ - Return the same response for valid and invalid usernames to avoid revealing account existence.
1818
19193 . Enforce a short OTP or recovery link lifespan
2020
21- - Set a short validity period for OTP or recovery link (recommended: 1 minute) to reduce risk from interception.
22- - A short expiration window significantly reduces exposure.
21+ - Set a short validity period for OTP or recovery link (recommended: 1 minute) to reduce risk from interception.
22+ - A short expiration window significantly reduces exposure.
2323
24244 . Increase OTP complexity
2525
26- - Use stronger OTP to resist brute-force and guessing attacks:
27- - Use 6–8 digit numeric OTP or alphanumeric OTP.
28- - Stronger OTPs increase the difficulty of automated attacks.
26+ - Use stronger OTP to resist brute-force and guessing attacks:
27+ - Use 6–8 digit numeric OTP or alphanumeric OTP.
28+ - Stronger OTPs increase the difficulty of automated attacks.
2929
30305 . Implement rate limiting for OTP submission
3131
32- - Rate limit OTP verification endpoints by IP address.
33- - Consider progressive delays or temporary lockouts after repeated failures.
32+ - Rate limit OTP verification endpoints by IP address.
33+ - Consider progressive delays or temporary lockouts after repeated failures.
3434
35356 . Notify users of password recovery attempts
3636
37- - Notify users when a password recovery flow completes successfully.
38- - Include in the notification:
39- - A warning if the user didn't initiate the request
40- - Recommended steps to secure their account
41- - Notifications help users detect unauthorized activity early.
37+ - Notify users when a password recovery flow completes successfully.
38+ - Include in the notification:
39+ - A warning if the user didn't initiate the request
40+ - Recommended steps to secure their account
41+ - Notifications help users detect unauthorized activity early.
0 commit comments