how whatsapp qr code works

Step 1) Browser sends hello message to Node.js server using Websocket.

Step 2) Node.js server generates a unique identifier and sends to browser using Websocket. Then browser generates a QR code using unique identifier and shows to user.

Step 3) User login to the mobile app using Facebook authentication.

Step 4) After the successful authentication, user scans the QR code.

Step 5)  After scanning, App sends Unique ID (from QR), access token (from FB) to Node.js server.

Step 6) Node.js Server sends access token to the respective browser using Websockets.

Step 7) Browser get the Facebook user information using recevied FB access token.

Leave a Reply