zesty-io / accounts-ui

Zesty.io account management application
https://accounts.zesty.io
112 stars 14 forks source link

Disallow 2FA enablement without country code #203

Closed MukeshGKastala closed 3 years ago

MukeshGKastala commented 3 years ago

Describe the bug Enabling 2FA with a primary phone number and no country code responds with Two-Factor auth had a problem enabling

To Reproduce

  1. Login into an account that doesn't have 2FA enabled
  2. Navigate to account settings
  3. Enter phone number into Two-Factor Authentication (2FA) section(leaving out the country code) and click ENABLE AUTHY 2FA
  4. See error

Expected behavior Send PUT to Accounts API only when BOTH phone number and country code are present. Responding with Two-Factor auth enabled

Additional context

Bad Request: failed to enable authy: request to register authy user failed with status code: 400