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

prompt user on non-whitelisted hosts #51

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

benma
Copy link
Contributor

@benma benma commented Jun 29, 2024

Maintaining a whitelist in the binary does not scale and might put off
third party devs.

For a host that is not in the whitelist, we instead prompt the user if
they want to accept the connection.

Since we already run a server, we simply launch the browser on
confirmation page served by our server. It is a bit weird UX, but it
was the easiest solution I could find that works everywhere.

Alternatives considered:

  • native dialogs using rfd - unfortunately does not work on macOS as
    the main process is windowless
  • native dialogs using SDL: looks extremely ugly, hard to figure out deployment
  • use Rust's Tauri or Qt or similar for native UIs: hard to deploy

@benma benma force-pushed the user_verify branch 2 times, most recently from f11c4a8 to 0dee604 Compare July 1, 2024 10:29
Maintaining a whitelist in the binary does not scale and might put off
third party devs.

For a host that is not in the whitelist, we instead prompt the user if
they want to accept the connection.

Since we already run a server, we simply launch the browser on
confirmation page served by our server. It is a bit weird UX, but it
was the easiest solution I could find that works everywhere.

Alternatives considered:
- native dialogs using rfd - unfortunately does not work on macOS as
  the main process is windowless
- native dialogs using SDL: looks extremely ugly, hard to figure out deployment
- use Rust's Tauri or Qt or similar for native UIs: hard to deploy
Added basic BitBox styling. The HTML file is self contained and
only uses inline styles and inline svg graphics.
@benma benma requested a review from NickeZ August 13, 2024 17:53
@benma benma marked this pull request as ready for review August 13, 2024 17:53
@benma benma changed the title User verify prompt user on non-whitelisted hosts Aug 13, 2024
Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@benma benma requested a review from NickeZ August 18, 2024 20:34
@benma
Copy link
Contributor Author

benma commented Aug 18, 2024

@NickeZ switched to using a uuid in a separate commit for easy review. I'll squash it in the end.

Copy link
Collaborator

@NickeZ NickeZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utack

@benma benma merged commit a626256 into BitBoxSwiss:master Aug 20, 2024
5 checks passed
@benma benma deleted the user_verify branch August 20, 2024 18:15
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

Successfully merging this pull request may close these issues.

3 participants