Local multi-device testing with ngrok
Use ngrok to develop and test with multiple devices locally on your machine
ngrok makes local web applications reachable over the internet with a single command. The following steps show the setup and usage of ngrok for testing your Corbado setup locally with multiple devices.
Testing your local setup with ngrok allows Corbado to communicate with your local system, e.g. to access the application from different devices. In production or staging mode, system are often accessible over the internet anyways but for local developing and testing ngrok saves a ton of work.
ngrok config add-authtoken <your-authtoken>
For this guide, we assume you are using a Node.js app. If you are using a different framework / programming language, just change the run commands to start your (backend) application.
// Node.js example
npm run start
ngrok http <port>command starts the ngrok tunnel on the specified port. Our application runs on port 8080, so we'll execute
ngrok http 8080
The terminal will display something like the following:
Copy the ngrok URL in the red box which is needed for the Corbado developer panel.
Please open the ngrok URL in the browser before proceeding and confirm the usage.
Please use the ngrok URL as testing URL (instead of localhost) in your browser!
Authorized origins for localhost and ngrok