-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/fallback pairing seed2 #5614
Merged
Merged
Commits on Jul 28, 2024
-
feat(pairing)!: Add extra parameters and remove v2 compatibility
This commit includes the following changes: I have added a flag to maintain 2.29 compatibility. Breaking change in connection string The local pairing code that was parsing the connection string had a few non-upgradable features: It was strictly checking the number of parameters, throwing an error if the number was different. This made it impossible to add parameters to it without breaking. It was strictly checking the version number. This made increasing the version number impossible as older client would just refuse to connect. The code has been changed so that: Two parameters have been added, installation-id and key-uid. Those are needed for the fallback flow. I have also removed version from the payload, since it wasn't used. This means that we don't support v1 anymore. V2 parsing is supported . Going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one). https://www.youtube.com/watch?v=oyLBGkS5ICk Is a must watch video for understanding the strategy Changed MessengerResponse to use internally a map of installations rather than an array (minor) Just moving towards maps as arrays tend to lead to subtle bugs. Moved pairing methods to messenger_pairing.go Just moved some methods Added 2 new methods for the fallback flow FinishPairingThroughSeedPhraseProcess https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R29 EnableAndSyncInstallation https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R18 Flow for clients Client A1 is logged in Client A2 is logged out Client A1 shows a QR code Client A2 scans a QR code If connection fails on A2, the user will be prompted to enter a seed phrase. If the generated account matches the key-uid from the QR code, A2 should call FinishPairingThroughSeedPhraseProcess with the installation id passed in the QR code. This will send installation information over waku. The user should be shown its own installation id and prompted to check the other device. Client A1 will receive new installation data through waku, if they are still on the qr code page, they should show a popup to the user showing the received installation id, and a way to Enable and Sync, which should call the EnableAndSyncInstallation endpoint. This should finish the fallback syncing flow. Current issues Currently I haven't tested that all the data is synced after finishing the flow. I see that the two devices are paired correctly, but for example the DisplayName is not changed on the receiving device. I haven't had time to look into it further.
Configuration menu - View commit details
-
Copy full SHA for 939d224 - Browse repository at this point
Copy the full SHA 939d224View commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7a93f70 - Browse repository at this point
Copy the full SHA 7a93f70View commit details -
Configuration menu - View commit details
-
Copy full SHA for e740f5c - Browse repository at this point
Copy the full SHA e740f5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45f17e1 - Browse repository at this point
Copy the full SHA 45f17e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for bace192 - Browse repository at this point
Copy the full SHA bace192View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1563b95 - Browse repository at this point
Copy the full SHA 1563b95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 811c533 - Browse repository at this point
Copy the full SHA 811c533View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae19375 - Browse repository at this point
Copy the full SHA ae19375View commit details -
Configuration menu - View commit details
-
Copy full SHA for cc1ecdf - Browse repository at this point
Copy the full SHA cc1ecdfView commit details
Commits on Jul 30, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 347ca73 - Browse repository at this point
Copy the full SHA 347ca73View commit details -
Configuration menu - View commit details
-
Copy full SHA for c96b661 - Browse repository at this point
Copy the full SHA c96b661View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.