We're Hiring!

Approov Integration for Node.js Backends

twitter-shared-link-1

Photo by Michael on Unsplash

Node.js was written initially by Ryan Dahl in 2009, and shown for the first time in the same year at the European JSConf. Dahl created Node.js to overcome the limit of around 10,000 concurrent connections in Apache, the most popular web server at that time.

Node.js brings the javascript from the browser to the server side, allowing developers to create applications with the same programming language in the frontend and backend. Node.js combines the use of an event loop and a low-level I/O API with Google's V8 JavaScript engine to allow for an event driven architecture capable of asynchronous I/O with the aim of optimizing for scalability and throughput.

The integration of Approov within a Node.js API server will ensure that your API can only be accessed by genuine instances of your mobile app. Scripts and bots will be blocked. This is achieved by adding the Approov SDK to your mobile app and implementing the Approov Token check in your Node.js code couldn’t be easier because the token is a regular signed JWT. All you need is to use the auth0/node-jsonwebtoken package to check the expiry time and verify the signature with the secret known only by your Node.js API server and the Approov cloud service.

To enhance the protection of your Node.js API further, you can secure each request by using the Approov Token Binding advanced feature of Approov. This allows you to check the binding of a header in the request with the Approov token itself, for example, the user authentication header.

Please follow one of the Quickstart guides in the repo to learn how to integrate Approov into your current Node.js project.

If you have any questions around why or how to use Approov in your Node.js project, don’t hesitate to contact us.

Paulo Renato

Paulo Renato is known more often than not as paranoid about security. He strongly believes that all software should be secure by default. He thinks security should be always opt-out instead of opt-in and be treated as a first class citizen in the software development cycle, instead of an after thought when the product is about to be finished or released.