Including the Browser SDK in your webpage is a simple way to evaluate authentication risk (in conjunction with the Proxy SDK). This guide will show you how to set up your development environment to get started developing with the Browser SDK.
- Download and install Node
Create a new Node project using the following bash command.
npm init -y
This will create a
package.json file, which will keep track of all your
project's dependencies, making your development process easier.
The following dependencies will be required for this demo:
Use npm to install these dependencies:
npm install adaptive-browser-sdk express body-parser express-session
index.js file will be the starting point of your project. This is the
script that will run first when you run your project.
Import the Express by adding the
following line to the top of your
const express = require('express');
To set up your Express server, add the following code to your
const app = express(); // Add JSON middleware, since we'll be handling JSON requests app.use(express.json()); // Define a static route for the Browser SDK npm module, so it can be served from a static webpage app.use('/static/adaptive-v1.min.js', express.static(__dirname + '/node_modules/adaptive-browser-sdk/dist/adaptive-v1.min.js'));
You should now be ready to add a login page, and include the downloaded Browser SDK.
Next: Adding a Login Page
Previous: Getting Started