An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![@graywolfai/firebase-express-jwt](https://badge.fury.io/js/%40graywolfai%2Ffirebase-express-jwt.svg)](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.