https://github.com/maximemoreillon/express_identification_middleware
An authentication middleware for Express
https://github.com/maximemoreillon/express_identification_middleware
express jwt nodejs typescript
Last synced: 3 months ago
JSON representation
An authentication middleware for Express
- Host: GitHub
- URL: https://github.com/maximemoreillon/express_identification_middleware
- Owner: maximemoreillon
- License: mit
- Created: 2021-04-17T15:06:19.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-22T07:30:59.000Z (about 1 year ago)
- Last Synced: 2026-01-30T13:29:25.206Z (5 months ago)
- Topics: express, jwt, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 108 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Express identification middleware
An expres middlewware to identify users from their HTTP requests.
## Usage
```typescript
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