Setup WSS
Set-up a web-socket server between your app and OpenPassport.
Context
Web-socket are used to communicate between OpenPassport mobile app and web browser SDK. OpenPassportQRcode component is using by default OpenPassport one.
We encourage you to deploy and manage your own WSS.
This web-socket server is designed to run on a linux server with Node.js installed.
You can run it with PM2, any process manager or simply with node.
Installation
Clone the repository:
git clone https://github.com/zk-passport/websocket-serverInstall dependencies:
cd websocket-server
yarn installUsage
Start the server:
yarn startNginx Configuration example
To ensure secure communication between the mobile application and the websocket server, it is necessary for the server to have an HTTPS endpoint.
Redirect your domain to the server ip address and setup ssl with certbot.
Here is an example of an Nginx configuration that sets up an HTTPS endpoint for the websocket server:
Last updated