Skip to content
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

Pair multi device #80

Closed
Kukks opened this issue Aug 9, 2024 · 4 comments
Closed

Pair multi device #80

Kukks opened this issue Aug 9, 2024 · 4 comments

Comments

@Kukks
Copy link
Member

Kukks commented Aug 9, 2024

When wanting to use a second device with the same btcpay account, you will be required to get the encryption key from an already paired device.

I have added a new page under settings, Encryption key, that allows you to view yours, or to enter one.

As a user who has just started a new app for the first time, this encryption key is CRITICAL. It is generated by deriving at a well-defined path from your (also newly generated) mnemonic seed phrase. This key is used to encrypt all data backed up to BTCPay Server. It cannot be uploaded to BTCPay Server as otherwise, the server administrator has access to your wallet.
We should

  • Inform the user of this
  • Provide a way for the user to back this key up (backing up the seed phrase is actually enough, but if you trust that the btcpay instance will store your backup reliably, storing just the encryption key is sufficient and less obviousin what it is to whoever spots it or accesses it.

As a user who wishes to pair a new device to an already existing app instance, you currently have to enter the host, credentials, store. Then, the app will check with the server if there is data backed up owned by you, and if yes, will redirect you to the encryption key page to input it. Without this key, you can still use the merchant tooling, but this device will not be able to run the lightning node (if the other device is still running, the app will just work)

Ideally, we follow a similar flow to messaging applications like TG and signal and whatsapp, etc, where you are presented with a QR or a link on an active paired device, and scanning on a new device, will configure everything for you.

You will see that the hub status can be Cnnected as Master or Connected as Slave.
A slave device does NOT run the lightning node. Instead, it simply syncs the backup state to it constantly.
A master device runs the lightning node and allow onchain wallet management too. It is constantly syncing its state TO BTCPay Server.
A master device is able to attempt to switch to slave, but if no other device steps in, switches back to becoming master, to ensure a consistent, online node.

@pavlenex
Copy link
Contributor

pavlenex commented Aug 9, 2024

Can the UX here be similar to Signal/Whatsapp or any other messenger pairing? Scan a QR from another device? To me that seems pretty familiar way to obtain an encryption key? So it can be called "Pairing device" process.

Edit, oh sorry I just saw you literally mention this!

Ideally, we follow a similar flow to messaging applications like TG and signal and whatsapp, etc, where you are presented with a QR or a link on an active paired device, and scanning on a new device, will configure everything for you.

@Kukks
Copy link
Member Author

Kukks commented Aug 9, 2024 via email

@dstrukt
Copy link
Member

dstrukt commented Aug 10, 2024

ACK - love the idea, and agree with Pairing Device as well!

@pavlenex
Copy link
Contributor

I'm closing this one in favour of #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants