btcpayserver / app

MIT License
5 stars 1 forks source link

Pair multi device #80

Open Kukks opened 1 month ago

Kukks commented 1 month ago

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

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 commented 1 month ago

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 commented 1 month ago

Exactly what I had in m mind.

On Fri, Aug 9, 2024 at 3:06 PM Pavlenex @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/btcpayserver/app/issues/80#issuecomment-2277905149, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN357VENJGYUDN6D5U6RYLZQS5GHAVCNFSM6AAAAABMIJJJ4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZXHEYDKMJUHE . You are receiving this because you authored the thread.Message ID: @.***>

dstrukt commented 1 month ago

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