status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.9k stars 987 forks source link

Keycard - Allow user to migrate existing Profile to the new (blank) Keycard #21316

Open ilmotta opened 1 month ago

ilmotta commented 1 month ago

Feature Issue

User Story

As a user, I want to be able to migrate my existing Profile key pair to my purchased and unused Keycard, so that I can use a simpler and more secure mechanism to login to Status and sign all my transactions.

Description

The flow starts at the Keycard Settings (user is logged in), and the user should be able to successfully migrate their existing Profile to an unused Keycard. Flows in Figma

The various error conditions should all be handled gracefully in the UI. In order to release a minimum viable feature (MVF), we won't support all features in the Mobile app. Instead, we will ask the the user to use the Desktop app in such cases. For example, when a Keycard is locked.

Implementation

The feature must be implemented using a feature flag, disabled in release builds.

86doteth commented 1 week ago

will there be any way for users with existing keycards configured on desktop to import/sync their accounts into mobile? it doesnt seem like any of these issues will fix that problem.

we won't support all features in the Mobile app. Instead, we will ask the the user to use the Desktop app in such cases. For example, when a Keycard is locked.

i hope this part doesnt mean that my case as in the screenshot wont ever be fixed. that would mean id have to choose between using a keycard account exclusively either on desktop or mobile (which is the case now for my main account 8️⃣6️⃣.eth) 😅

Image

flexsurfer commented 1 week ago

hi 86doteth , could you please share the steps how you get the sate on the screenshot, thanks

86doteth commented 1 week ago

@flexsurfer

  1. move keypair onto keycard using the desktop app
  2. import account into mobile by going through flow for ‘i already have status account on different device’ and getting the sync code from desktop. in my case (ios) desktop and mobile do say they recognized each other and then mobile stays in the syncing screen for a while but then briefly on that same syncing progress screen a lot of message banners suddenly fill up the screen (they appear to be community history from past few days) and then mobile app crashes. desktop then says syncing is done.
  3. reopen mobile app see login screen with proper profile pic (but just public key instead of ens name for some reason)
  4. enter pin (as it does recognize its a keycard login) and scan keycard
  5. then it shows the screenshot in previous message
86doteth commented 1 week ago

as an aside on 2.30 and testflight i have constantly had crashes after having the app open for about 4-5 minutes while not even doing anything so it might be that the crash in step 2 is simply due to having the app open for a few minutes and its time to crash again

ilmotta commented 18 hours ago

Hi @86doteth, thank you for always sharing very detailed steps for reproduction.

will there be any way for users with existing keycards configured on desktop to import/sync their accounts into mobile?

The upcoming release 2.32 will at least support one major flow, the one this GH issue describes. The focus will be on users who already have an unused keycard and are using the Mobile app v2. We understand this is not the use case you described. The 2.31 release going out soon won't solve your problem yet.

But, I do want to believe that in 2.32 we will be able to support sign-in in the mobile app via a keycard that already has a keypair in it, but we have other priorities to tackle concurrently, so we can't promise. The solution probably won't be via pairing & syncing as you tried because that is more complicated and pairing is quite unreliable.

If we resolve issue https://github.com/status-im/status-mobile/issues/21446 for release 2.32 you will be able to reuse your keycard across both desktop & mobile. 2.32 will likely be released until the EOY.

as an aside on 2.30 and testflight i have constantly had crashes after having the app open for about 4-5 minutes while not even doing anything so it might be that the crash in step 2 is simply due to having the app open for a few minutes and its time to crash again

We noticed that many iOS users with push notifications enabled face frequent crashes (I suffer from this too). Push notifications as a whole is yet another part of the product that we will eventually tackle with a fresh spirit, but not for 2.32. If you want a bit more stability in iOS, we recommend disabling push notifications in the Settings.