Commit Graph

786 Commits

Author SHA1 Message Date
Harry
4ee467be2b
Add screens unique to change number to new registration flow
* Add splash controller for change number flow

* Add copy of change number phone number entry controller

* add copy of change number confirmation view controller

* hook up change number phone number entry screens

* fix header color

* fix change number error view

* add some spacing before error label

* run auto genstrings

* actually fix string comment
2023-03-24 12:32:59 -07:00
Max Radermacher
cf8593bbe3
Add tests for 2-way contact merging logic 2023-03-23 14:00:52 -07:00
Max Radermacher
fa7f0e98fa
Clear “display badge” when your last badge expires
Also, explicitly track “old badges” vs. “new badges” when redeeming.
2023-03-23 00:32:42 -07:00
Harry
c0444ff246
Wait a short time for push challenges before preferring captcha 2023-03-22 09:33:41 -07:00
Harry
68f34d10cd
Let the user change e164 after entering one in registration bravo
* Allow changing e164 after entering one + tests

* hook up back to change number from sms code verification screen

* nit

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>

* nit 2

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>

---------

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2023-03-22 07:52:34 -07:00
Evan Hahn
492284cab6
New registration: warn about remaining PIN attempts 2023-03-21 17:37:06 -05:00
Harry
0297ecf615
Test re-registration in RegCoordinatorTests
* parametrize reg coordinator tests

* test re-registration via test suite param
2023-03-19 16:07:25 -07:00
Harry
5ad17c4f2d
Support change number in registration coordinator
* Factor out RegistrationCoordinatorLoader

* Add PNI change number state to regcoordinatorloader

* Don't exit change number flow once we start a pni operation

* Add ChangePhoneNumberPniManager to reg coordinator dependencies

* add params required for pni to change number registration mode

* change number from regcoordinator

* rename ChangePhoneNumber -> LegacyChangePhoneNumber

* remove pni change number support from LegacyChangePhoneNumber

* remove codable conformance from pni change number manager's pending state

* Update ts account manager state when finalizing change number

* Add message processor deps to reg coordinator

* addAsyncCompletion on dbv2 write transactions

* Suspend message processing while doing a reg coordinator change number

* hook up change number

* Add handler-free message processing suspension method

* odds and ends

* minor cleanup

* slight refactor to finalize change phone number in the export function

* Put wait for message processing + suspend onto messageProcessor

* kick of prekey refresh after pni change number finalize transaction ends

* nit
2023-03-17 17:55:06 -07:00
Harry
8f8e74e2b5
Update message processor suspension-related behavior
* use set of enums for message suspensions

* Update meaning of isDrainingPendingEnvelopes

* rename messageProcessorDidFlushQueue -> ...DidDrainQueue
2023-03-16 14:23:10 -07:00
Harry
e6e4502363
Update RegCoordinator's requests in preparation for pni change number
* add whoami request to reg coordinator

* Add pni change number params to reg bravo change number request

* Remove username as a requirement for reg coordinator's account identity

* pr feedback
2023-03-16 13:59:50 -07:00
Harry
a31fb00368
Change all e164 references in reg coordinator to E164 type 2023-03-16 11:32:13 -07:00
Evan Hahn
f5bd3b95fe
Add (dormant) "app needs to be updated" alert during registration
If your app needs to be updated during registration, we'll show an
alert. This can happen if:

- The build has expired
- We receive an unexpected challenge (or a push challenge we cannot
  fulfill, but must)
2023-03-15 12:54:42 -05:00
Sasha Weiss
8047472f68
Rename SubscriptionManagerProtocol 2023-03-14 17:44:38 -07:00
Harry
ac9a68688c
Set registration recovery password in AccountAttributes
* Move AccountAttributes into shared file

* Add AccountAttributesRequestFactory

* Add new AccountAttributes generators

* Migrate verifyPrimaryDeviceRequest

* Migrate verifySecondaryDeviceRequest

* clarify the role of secondary device account attributes

* Remove AuthKey from AccountAttributes; it was unused on the server and therefore totally vestigial

* remove old updatePrimaryDeviceAttributes request and associated code

* Add registration recovery password to AccountAttributes

* Unconditionally set account attributes when changing or setting the PIN

* fix tests

* easy pr comments

* dont set v1 2fa pin unless no kbs backups exist
2023-03-14 13:11:09 -07:00
Harry
6a613d1b03
Allow re-registration using RegistrationCoordinator
* Rename and move out RegistrationMode

* Group RegCoordinatorImpl dependencies together

* Take a registration mode on reg coordinator init

* Implement exiting registration if allowed

* Allow restoring previous registration mode directly

* Proceed from last mode on app startup

* Hook up new re-registration

* allow submitting phone number for re-registration

* skip device transfer in rereg

* Don't implicitly enable reglock by setting the token on account attributes. add a test to validate this going forward.

* pr comments
2023-03-14 12:34:46 -07:00
Harry
a146e18aaf
Set up account state and exit registration
* Go to chat list view after registration

* sync system contacts during registration

* Use explicit local credentials for storage service operations during registration

* fix tests

* Quick hack to get through double pin confirmation

* Finishing touches

* lint

* fix build

* reload phone number discoverability after storage service sync

* fix tests again

* Take chat auth on account and contact record initializers

* Change around branches for clarity in OWSUserProfile

* pr comments

* Split ChatServiceAuth into the same and AuthedAccount

* fix tests

* merge woes
2023-03-09 21:54:51 -08:00
Sasha Weiss
82fad84831
Initial implementation of PNI change-number 2023-03-09 17:13:16 -08:00
Evan Hahn
2d48da8a6d
Handle new registration push challenges 2023-03-09 15:54:47 -06:00
george-signal
45186034d6
Bring order to index paths in All Media 2023-03-06 14:55:17 -08:00
george-signal
ce18ac8d29
[All media] Add filtering to prerelease builds. 2023-03-03 15:55:13 -08:00
Harry
23368e413f
Only mark APNS tokens as , preventing rotation, for up to 60 days 2023-02-28 15:52:21 -08:00
Evan Hahn
41ff3c142b
Rewrite debug log scrubbing logic in Swift
Also introduces additional defense-in-depth improvements.
2023-02-28 15:55:00 -06:00
Harry
cb6e99dd1d
Mark registration complete in RegistrationCoordinator 2023-02-24 11:12:22 -08:00
Harry
38cba70b85
Hook up new registration PIN entry screen 2023-02-23 09:50:17 -08:00
Harry
f5bdd6bafa
Hook up RegistrationVerificationViewController
* Hook up RegistrationVerificationViewController

* Fix existing tests

* add new test cases

* pr comments
2023-02-21 08:37:08 -08:00
Harry
dc1ac4fc8b
Hook up RegistrationPhoneNumberViewController
* Hook up RegistrationPhoneNumberViewController

* Fix existing tests

* add some new tests; fix test scaffolding bug

* Show an error before going back to phone number entry if the session is invalidated
2023-02-21 07:46:56 -08:00
Harry
798ad6dc67
Hook up RegistrationPermissionsViewController
* Hook up RegistrationPermissionsViewController

* Update tests accordingly

* rebase woes

* Simplify opening path testing in RegistrationCoordinatorTest
2023-02-17 16:31:13 -08:00
Harry
eec4e88b6e
Hook up RegistrationSplashViewController
* Hook together splash screen

* Mark splash as shown when moving past it, not when showing it

* pr comments
2023-02-17 15:52:33 -08:00
Harry
cd63f67b3e
Retry most network failures in RegistrationCoordinator
* Retry most network failures in RegistrationCoordinator

* Update the way we identify network errors to be more flexible

* Retry remaining requests

* Automatically retry registration requests if time intervals are short

* fix error types not compiling on kbs

* Add test for reg recovery password reg with retries

* fix extra t
2023-02-17 14:50:54 -08:00
Harry
a6b2326ef3
Update registation API responses to match updated server spec
* Interpret nil nextVerificationAttempt as a code not having been sent yet, not as no code able to be submitted

* Update request and submit verification code handlers to latest server spec

* Update CreateAccountResponse codes to match server spec

* Update ChangeNumberResponse codes to match server spec

* Rename some cases for clarity, propagate up network errors vs generic errors

* pr comments
2023-02-17 14:11:43 -08:00
Harry
a23d469aac
Finish registration in RegistrationCoordinator
* Finish registration in RegistrationCoordinator

* Get tests to compile again (but not pass)

* Tests passing again

* Test session happy path all the way through to completion

* Test KBS auth credential happy path all the way through to completion

* Test KBS reg recovery password happy path all the way through to completion

* PR comments
2023-02-16 17:21:21 -08:00
Sasha Weiss
44a6fa24ab
Add contacts' usernames to ContactRecord, if nothing better available 2023-02-14 13:42:53 -08:00
Sasha Weiss
bb7013ec71
Store the local username on AccountRecord 2023-02-14 11:25:48 -08:00
Harry
9501a5bbf5
Populate AccountAttributes in RegistrationCoordinator
* Populate AccountAttributes in RegistrationCoordinator

* pr comments and cleanup
2023-02-14 10:40:47 -08:00
Harry
3d6225060d
Add RegistrationCoordinator
* Add ability to compute registration recovery password

* Add RegistrationCoordinator

* remove repeat nav controller that evan added

* Scaffolding for RegistrationCoodinator test

* Add first round of RegistrationCoordinator tests, some stuff I needed to get them working, and some fixes to RegistrationCoordinator itself I discovered thanks to the tests

* switch to owsFailBeta

* Add auth credential candidate flow tests, related fixes and additions to coordinator and friends

* Add tests for session based registration path and associated fixes

* PR comment nits
2023-02-14 08:50:24 -08:00
Max Radermacher
9e3b5a06fc
Use LibSignalClient for Device Transfer certs
Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Pete Walters <pete@signal.org>
2023-02-13 14:16:18 -08:00
Max Radermacher
135074b570 Verify IAS certificates using LibSignalClient 2023-02-10 10:23:50 -08:00
Sasha Weiss
e5f1af6c2e
Support lookup-by-username 2023-02-08 10:16:57 -08:00
Evan Hahn
b95a1c4363
Make FullTextSearchFinder stateless
This change should have no user impact. I think this is a useful
cleanup.
2023-02-06 13:33:43 -06:00
Max Radermacher
3417fe2e20
Handle system contacts on linked devices
* Remove old migration code
* Rename some files
2023-02-01 16:18:59 -08:00
Sasha Weiss
98bd0ef77c
Add a button to share your username from profile settings 2023-01-27 16:22:34 -08:00
Sasha Weiss
1126c98f19
"Select a username" UX 2023-01-26 11:38:21 -08:00
george-signal
242d949439
Race condition fixes in MediaGallerySections 2023-01-23 15:45:24 -08:00
Evan Hahn
f387afb745
Clean up badge expiration sheet tests
This test-only change should have no user impact.

I wrote these tests last year (in
c5bdf6c094). They test every single
string, which proves annoying to update and offers little value. This
updates the tests in an effort to make them more useful.
2023-01-20 18:30:17 -08:00
Max Radermacher
bd7f7440bf
Consolidate checks for whether to use web sockets
Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2023-01-20 13:19:39 -08:00
Sasha Weiss
bcbf52101e
PayPal recurring donations
Co-Authored-By: Evan Hahn <evanhahn@signal.org>
2023-01-18 14:48:50 -08:00
Evan Hahn
46b4cb7fae Update gift badge copy on badge expiration sheet 2023-01-11 09:44:59 -06:00
Max Radermacher
a283045058 Improve collation methods in ContactsPicker 2023-01-10 14:43:09 -08:00
Evan Hahn
f3b8ded89f
Show "choose payment method" sheet for gift badges
We plan to support PayPal and credit/debit cards for gift badges. This
change, invisible to external users, is a step towards that.

Before this change, Apple Pay was always shown as the only payment
method. Now, all supported payment methods are shown.

PayPal and card don't do anything right now—they show an error UI if
tapped.
2023-01-10 13:35:05 -06:00
george-signal
e47a9cba34
Adopt MediaGalleryCollectionViewUpdater, redux. 2023-01-04 14:26:44 -08:00