Build a Login and Logout API using Express.js (Node.js)
Table of contents
Introduction
The Concept of Authentication and Authorization
Authentication
Authorization
Setting up the development files, installing required packages, and creating a database
Creating Main Route and API server instance
C...
mjosh.hashnode.dev27 min read
Mikael Engvall
I had to use
jwt.verify(cookie, process.env.SECRET_ACCESS_TOKEN, async (err, decoded) => {
instead of
jwt.verify(cookie, config.SECRET_ACCESS_TOKEN, async (err, decoded) => {
in the verify.js file because config wasn't defined.