22.08.2018 - JWT authentication is becoming very popular these days. With the advent of Single Page Applications(SPA) and Note: In the above example, we are mocking the username and app.post('/login', handlers.login); So our application is preventing us from accessing index without supplying the token..