How to Authenticate Users: JWT vs. Session

How to Authenticate Users: JWT vs. Session

Blog
In web applications, you try to decide when to use either JSON Web Tokens (JWTs) or sessions (cookies) for authentication. When you browse the web you use HTTP, which is a stateless protocol. So, the only way to remember the states of your application is using either sessions or tokens. Goals This article deep dives into: Differences in using sessions and JSON Web Tokens for authentication How server-side session store works Advantages of sessions over JWT Advantages of using JWT and other things concerning the structure of JWT. JWT vs. Session: What to Use? Deciding to choose between JWT or session is not just choosing one over the other. You need to look at some factors to determine which one to use in an application. In order to figure this…
Read More
Use Fetch API for web apps

Use Fetch API for web apps

Blog
Fetch API has become the standard for web API requests for a while now and it is supported in almost any modern browsers nowadays. Let’s use Fetch API and implement it for the web Use Fetch API Previously, there are many existing solutions for handling API requests for the web, ex. jQuery Ajax, request (node), axios (node) … why there needs another? Why Fetch API? Fetch API is the standard API being supported native in most of today web browsers. Fetch API is widely supported – caniuse.com Hmm, IE is not supported, you ask? Since Microsoft stopped support for IE, no more development for IE in future, and we will expect very less number of users use IE. Fetch API Specifications The specs of Fetch API is described here, https://fetch.spec.whatwg.org/ Check…
Read More
Understanding Transport Layer Security TLS .

Understanding Transport Layer Security TLS .

Blog
              TLS is the critical Internet infrastructure that makes commerce, trust, and confidentiality possible. Transport Layer Security is on the short list for "most important security protocol on the Internet." It is designed to enable client-server applications like web browsers and servers to securely communicate over the Internet, protecting against eavesdropping, tampering, and message forgery. Each party can know that the other is who they claim to be. TLS is the technological descendant of Secure Sockets Layer and is often referred to casually as SSL. The earlier SSL versions were developed by Netscape Communications. In the late 1990s, after AOL bought Netscape, the Internet Engineering Task Force (IETF) took over the protocol. Version 1.0 of TLS had only small differences compared with SSL 3.0.…
Read More