-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hey @THPubs !
I'm Nicolas and I work on the Firebase team.
I just noticed your middleware. It's nice work! :)
I was wondering if you would be willing to implement additional features? I was about to release a Firebase Middleware myself but we'd rather build on top of the community's work if it exists :)
Here is the improvements that would be awesome:
- Allowing The ID Token to be passed in Cookies too (rather than just auth headers).
- Configurable Cookies names.
- Requires the keyword
Bearerin the Authentication header since that's more consistent with ID Token authentication specs. - If no Service accounts file is passed then instantiate a Firebase admin instance using the default app credentials (available in Google Cloud Environment) automatically.
- Option to generate Custom auth tokens for the authenticated User.
I have implemented all these features in this file: https://github.com/nicolasgarnier/friendlypix-web-react/blob/master/microservices/firebase-express-middleware.js feel free to check it out!
Would you be willing to implement these or opened to contribution for me (I could send a Pull Request with this code)?
I'd like to use these in some blog post/article I will write up later on and in some official Firebase sample which is why I'm looking for all these features :)
Cheers!