Skip to content

wdi-sg/express-api-user-token-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express API User Token Authentication Example

This example shows a way to secure an API on a per user basis - without using passport or JWTs. It works by generating a unique token per user and validating that this token is sent in the http request header for each request the user makes. The client side JavaScript stores this token in the browser Local Storage and uses it to auto login the user on page reload. This is a single page example but the approach works for multi-page sites as well.

About

A simple example of authentication for an express api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published