mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
* feat(cognito): issue attribute verification codes in CognitoService * feat(cognito): dispatch GetUserAttributeVerificationCode in CognitoJsonHandler * test(cognito): add GetUserAttributeVerificationCode happy path * test(cognito): cover invalid token and unverifiable attribute errors * docs(cognito): document GetUserAttributeVerificationCode * fix(cognito): key attribute verification codes per attribute * fix(cognito): match AWS error messages for GetUserAttributeVerificationCode Real Cognito returns "Invalid Access Token", "Invalid attribute name. Only phone_number and email can be verified.", and attribute-specific "User does not have a valid registered email address" / "...phone number" messages, per AWS-parity comparison in PR #1898 review. * fix(cognito): match AWS destination masking format for verification codes Real Cognito masks as "z***@b***" for email (first char of local part and domain, three asterisks, no TLD retained) and "+********8920" for phone (leading "+", asterisks, last four digits kept), per AWS-parity comparison in PR #1898 review. Applies to both attribute-verification and forgot-password/account-recovery delivery masking, which share these helpers. * test(cognito): assert exact AWS-parity error messages and mask format Tighten GetUserAttributeVerificationCode assertions from loose containsString checks to the exact wording and masking AWS returns, so a regression in either silently drifting from AWS again is caught. * test(cognito): cover re-issuing verification code for a verified attribute AWS permits requesting a fresh GetUserAttributeVerificationCode code for an attribute that is already verified, as long as its value has not changed. Nothing in the current issuance path checks the *_verified flag, so this locks in that AWS-parity behavior. * style(cognito): drop redundant comment in attribute verification test The method name already conveys the AWS behavior being tested, per AGENTS.md's guidance to prefer self-explanatory code over comments.