This guide demonstrates how to implement user verification end-to-end using a simply Node.js Express server.
User verification ensures that only authorized users can access your private roadmaps or widgets. Because this process involves sensitive credentials (your Shared Secret), the authentication token must be generated on your server, never in the browser.
NextJS demo
You can find an examxple implementation of the user verfiication flow in NextJS on Github.
Open your terminal and run the following commands to create a folder and install the necessary web server framework (express).
2
Create the server file
Create a file named server.js and paste in the code below.
Security Warning
This example includes your SHARED_SECRET for demonstration purposes. In a production environment, use Environment Variables (e.g., .env files) to keep secrets out of your source code.
3
Run the server
Start the application in your terminal:
Bash
4
Tunneling (Required for HTTPS)
Most browsers restrict embedded widgets or cookies when running on localhost. To test this properly, you need a public https URL. We recommend using a tool like ngrok.
Install ngrok (if you haven't already).
Run the tunnel in a new terminal window:
Bash
Copy the Forwarding URL provided by ngrok (e.g., https://a1b2-c3d4.ngrok-free.dev).
Important: Add this URL to your Allowed Domains in the Released dashboard if you have domain restrictions enabled.
Open the URL in your browser to see your authenticated roadmap.