Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Properly Securing Node.js APIs

Properly Securing Node.js APIs

Properly securing Node.js APIs at WebWeekend Kathmandu #WWKTM .

Chathu Vishwajith

September 22, 2018
Tweet

More Decks by Chathu Vishwajith

Other Decks in Programming

Transcript

  1. ?

  2. Things to Remember → JWTs are encoded not encrypted! →

    This does not mean they can modify it though, even the slightest change will invalidate the token → Do not store sensitive information within a JWT. → Solution: JSON Web Encryption allows you to safely encrypt the claims of a token
  3. Organizing code → Module based approach. → Configuration in files.

    → Auto load models and routes. → Keep your secret secret.
  4. Summery → Some APIs needs to secure → Cookie vs

    Tokens → JWT is Stateless, Scalable, Decoupled → How to use JWT with Node.js