(core) Clarify phone message only supports U.S. numbers

Summary:
Adds a mention of phone message (SMS) verification currently only
supporting U.S. phone numbers, and updates CognitoClient to return
an error when a non-U.S. number is submitted to register_sms/.

Test Plan: Server test.

Reviewers: alexmojaki

Reviewed By: alexmojaki

Differential Revision: https://phab.getgrist.com/D3227
This commit is contained in:
George Gevoian 2022-01-19 18:26:20 -08:00
parent 0d005eb78d
commit db7d1802ce

View File

@ -227,7 +227,7 @@ export class MFAConfig extends Disposable {
cssAuthMethod(
cssAuthMethodTitle(cssGreenIcon('MobileChat2'), 'Phone message', testId('auth-method-title')),
cssAuthMethodDesc(
'You need to add a phone number where you can receive authentication codes by text.',
'You need to add a U.S. phone number where you can receive authentication codes by text.',
),
dom.on('click', () => currentStep.set('configure-phone-message')),
testId('sms-method'),
@ -672,12 +672,12 @@ export class MFAConfig extends Disposable {
cssModalBody(
formElement = dom('form',
cssMainText(
'You need to add a phone number where you can receive authentication codes by text.',
'You need to add a U.S. phone number where you can receive authentication codes by text.',
),
cssBoldSubHeading('Phone number'),
cssInput(phoneNumber,
{onInput: true},
{name: 'phoneNumber', placeholder: '+999 (99) 999 99 99', type: 'text', required: 'true'},
{name: 'phoneNumber', placeholder: '+1 (201) 555 0123', type: 'text', required: 'true'},
(el) => { setTimeout(() => el.focus(), 10); },
dom.onKeyDown({Enter: () => formElement.requestSubmit()}),
testId('phone-number-input'),