https://github.com/graywolftech/firebase-express-jwt
Express middleware for Firebase Auth
https://github.com/graywolftech/firebase-express-jwt
Last synced: over 1 year ago
JSON representation
Express middleware for Firebase Auth
- Host: GitHub
- URL: https://github.com/graywolftech/firebase-express-jwt
- Owner: graywolftech
- License: mit
- Created: 2020-08-28T14:05:14.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T14:31:21.000Z (almost 6 years ago)
- Last Synced: 2025-01-23T06:13:44.969Z (over 1 year ago)
- Language: TypeScript
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/%40graywolfai%2Ffirebase-express-jwt)
# firebase-express-jwt
Express middleware for Firebase to validate the JWT token.
## Usage
```
npm i @graywolfai/firebase-express-jwt
```
Requests that go to handlers that use this middleware should have an `Authorization: Bearer `. If the validation fails for any reason, a response with a status `401` is returned (see `index.ts` for details). If validation succeeds, the decoded `user` (`admin.auth.DecodedIdToken`) is placed in the request object.