Node.js
Create the Node.js application
Enter the following commands at a terminal prompt:
mkdir stepup-auth cd stepup-auth touch server.js
Run npm init to create the Node.js application, accepting all the defaults.
The application you will create uses the Express framework for routing and the Pug templating system for building the UI.
In addition to express and pug, you will be using the following external modules:
express-session- to manage the login state of the userbody-parser- to parsePOSTrequestsdotenv- to store your Vonage API key and secret and the name of your application in a.envfilenexmo- the Node Server SDK
Install these dependencies by running the following npm command at a terminal prompt:
npm install express express-session pug body-parser dotenv @vonage/server-sdk
Note: This tutorial assumes that you have Node.js installed and are running in a Unix-like environment. The terminal commands for Windows environments might be different.
Step-up Authentication
Add an extra layer of security when users perform sensitive tasks
手順
1
Introduction2
Create the Node.js application3
Initialize your dependencies4
Configure the application5
Define the routes6
Create the UI7
Display the home page8
Send the verification request9
Check the verification code10
Try it out!11
What's next?