On the internet nobody knows you're dog, but we'll make sure you're 18.
Built with openpassport.
- bun
- Mobile device that supports near-field communication (NFC).
- Proof of Passport app installed on mobile device: iOS, Android.
- A biometric passport (aka e-passport).
- On mobile app:
- Open proof of passport app on your mobile device.
- Scan your passport (Open Camera) OR use mock passport data > Generate passport data > Next.
- On desktop:
- Install deps:
bun i
. - Start local web client and verification server:
bun dev
. - Open local wep client:
localhost:5173
.
- Install deps:
- On mobile app
- Scan QR Code shown in desktop's browser.
- Tap verify.
- In the web client, you should be automatically be redirected to the protected page.
- With the OpenPassport mobile app, the passport electronic data is transferred to the mobile device by near field communication.
- With
@openpassport/sdk
, one can generate a QR code in the web client to request the generation of a specific proof (particular set of requirements). - Upon scanning this QR code, a web socket connection is opened between the mobile device and the web client.
- The user initiates the generation of the proof on the mobile device.
- The mobile device transfers this proof to the web client.
- The web client can now perform a verification (
@openpassport/sdk
<snarkjs
) of this proof or transfer this proof for an authentication server to verify it. - Depending on the verification result, the web client can authorize access to some restricted content.
- circuits from openpassport: circom/snarkjs
- openpassport mobile app
@openpassport/sdk
- I had issues with the packaging of this upstream dependency: it was mixing different targets and would lead to issues (e.g react stuff being imported server side). So in the verification server, I more or less copy pasted the original code into (see
lib/vendor
), cutting out the part not needed server side (react components etc...) - I refactored a bit the original
OpenPassport1StepQRcode
to skip the verification client side, as I wanted to perform it server side (avoiding doing it twice), and to split it in different sub components and hooks.
- I had issues with the packaging of this upstream dependency: it was mixing different targets and would lead to issues (e.g react stuff being imported server side). So in the verification server, I more or less copy pasted the original code into (see
- web client: react, tailwindcss
- verification server: express