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

Peer discovery & acceptance: JavaScript vs User Agent #16

Closed
backkem opened this issue Oct 1, 2023 · 1 comment
Closed

Peer discovery & acceptance: JavaScript vs User Agent #16

backkem opened this issue Oct 1, 2023 · 1 comment

Comments

@backkem
Copy link
Collaborator

backkem commented Oct 1, 2023

In the current explainer, both peerdiscovery and acceptance of incoming connections (peerB.accept();) is handled in JavaScript.

I wanted to highlight the approach that the Presentation API takes here. Instead of handling this in JavaScript, it's the User Agent that takes up this task. This is also similar to how ChromeCast-ing or bluetooth pairing works. This has the following potential advantages:

  • It avoids sharing the full list of discovered peers with the JavaScript context. This can be considered a privacy improvement.
  • A user explicitly chooses which peer is shared with the JavaScript context.
  • A user explicitly accepts an incoming connection before it is shared with the JavaScript context.
  • It gives the user agent the opportunity to authenticate a connection before it is passed to the JavaScript context (E.g. using a pre-shared pin code as done in the OpenScreen Protocol).
  • It leaves the user agent the opportunity to retain the authentication context for longer so the user doesn't have to re-establish it over-and-over.
@backkem
Copy link
Collaborator Author

backkem commented Dec 4, 2023

Considered closed by #23.

@backkem backkem closed this as completed Dec 4, 2023
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

1 participant