Skip to content

jtekt/express_identification_middleware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express identification middleware

An expres middlewware to identify users from their HTTP requests.

Usage

import express from "express"
import auth from "@moreillon/express_identification_middleware"

const app = express()
const authOptions = { url: `https://api.users.maximemoreillon.com/users/self` }

app.use(auth(options))

app.listen(8080, () => {
  console.log(`Express server started`)
})

Options

  • url: The URL of the identification route of the authentication API
  • lax: Boolean, set to true to allow unidentified users

About

An authentication middleware for Express

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%