About this sample app
This is a simple NodeJS app that demonstrates the Web Authentication APIs.
You can see a live version at https://webauthnsample.azurewebsites.net
Deploying a local instance
- Download and install NodeJS 8.9 or newer
- Download and install VS Code
- Download and install MongoDB Community
- Clone this repository
- Open this repository in VS Code
- Run npm install in the root directory
- Launch program - configurations should already be set
- In Edge, navigate to localhost:3000
Deploying to Azure
First, in Azure Portal:
- Create an app services web instance
- Create a Cosmos DB instance with API set to mongodb
Before deploying, you'll need to define the following environment variables inside app services application settings so they can be accessed by this NodeJS app at runtime:
- MONGODB_URL - connection URL to your mongodb. Get it from Cosmos DB settings. Pick the latest Node.js 3.0 connection string under Quick Start.
- JWT_SECRET - some long random string
- HOSTNAME - hostname of your deployed service (e.g. "webauthnsample.azurewebsites.net")
- ENFORCE_SSL_AZURE - set to "true"
- WEBSITE_NODE_DEFAULT_VERSION - set to "8.9.4" or newer