Add "Contact Numbers" so we can send users SMS mesages


Add "Contact Numbers" so we can send users SMS mesages

Ref T920. To send you SMS messages, we need to know your phone number.

This adds bare-bone basics (transactions, storage, editor, etc).

From here:

Disabling Numbers: I'll let you disable numbers in an upcoming diff.

Primary Number: I think I'm just going to let you pick a number as "primary", similar to how email works. We could imagine a world where you have one "MFA" number and one "notifications" number, but this seems unlikely-ish?

Publishing Numbers (Profile / API): At some point, we could let you say that a number is public / "show on my profile" and provide API access / directory features. Not planning to touch this for now.

Non-Phone Numbers: Eventually this could be a list of other similar contact mechanisms (APNS/GCM devices, Whatsapp numbers, ICQ number, twitter handle so MFA can slide into your DM's?). Not planning to touch this for now, but the path should be straightforward when we get there. This is why it's called "Contact Number", not "Phone Number".

MFA-Required + SMS: Right now, if the only MFA provider is SMS and MFA is required on the install, you can't actually get into Settings to add a contact number to configure SMS. I'll look at the best way to deal with this in an upcoming diff -- likely, giving you partial access to more of Setings before you get thorugh the MFA gate. Conceptually, it seems reasonable to let you adjust some other settings, like "Language" and "Accessibility", before you set up MFA, so if the "you need to add MFA" portal was more like a partial Settings screen, maybe that's pretty reasonable.

Verifying Numbers: We'll probably need to tackle this eventually, but I'm not planning to worry about it for now.

Test Plan:

Screen Shot 2019-01-17 at 7.38.00 AM.png (862×1 px, 201 KB)

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: avivey, PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T920

Differential Revision: https://secure.phabricator.com/D19988


epriestleyAuthored on Jan 16 2019, 5:56 PM
epriestleyPushed on Jan 23 2019, 9:40 PM
Differential Revision
D19988: Add "Contact Numbers" so we can send users SMS mesages
rPaa483738899d: Update `bin/auth` MFA commands for the new "MFA Provider" indirection layer
T920: Provide SMS Support
Build Status
Buildable 21658
Build 29540: Run Core Tests