Login
The following sample will show you how to make a simple connection handler. First, we will generate a QR Code that will be the entry point by which users can interact with your dApp. Once this QR Code is scanned and operation authorized, the account details are forwarded to you.
Prerequisites:
pageGetting startedStep 1: Import the following modules
Continue building on the index.js from the previous example (Environment Set-up) and add the following modules:
Step 2: Generate a QR Code
The process of generating a QR Code is straight forward. Within the async function, simply call generateQRCode and wait for the image.
You can optionally set the scope in the params to fetch the NFT during the login process. it's set by default toScopeEnum.PROFILE
Step 3: Listen to new Connections
Finally get noticed when a new user accept the connexion to your dApp.
⭐ Congratulations! You have successfully completed the process of authentication to our wallet
Code Check ✅
Your index.js file should look like this:
Last updated