Passes is a client-side browser API I authored that allows apps to make requests directly to users. It’s designed to enable: In this API, requests a

What Is Passes?

submited by
Style Pass
2024-02-13 18:30:05

Passes is a client-side browser API I authored that allows apps to make requests directly to users. It’s designed to enable:

In this API, requests and results are encoded as Uint8Arrays for transport, chosen for its performance and versatility. This encoding allows the same values to be used across platforms without imposing a specific structure like JSON at the protocol level.

When invoked, the browser opens a new tab to https://passes.org/request, which redirects the user to their Pass Provider. Their Pass Provider then sends a “connect” message to the requesting page (via window.opener.postMessage) which tells it to send the request back via postMessage.

When the user accepts or rejects the request, the result is sent back to the requesting page, again via window.opener.postMessage.

All transmission of requests and results is client-side, and since Passes.org has redirected to the user’s Pass Provider, it cannot see requests or results.

Leave a Comment
Related Posts