Skip to content
Antony Budianto edited this page Jan 7, 2017 · 16 revisions

Welcome to the express-firebase wiki!

Introduction

With this starter, you can start your own Application Server to be consumed by your Firebase app, while using Firebase Auth for authorization.

The client app just need to request to the server with Authorization: Bearer <firebase-access-token> header.

On the server, each request to /api will be checked by middleware. If the token is good, the response will be injected with decodedToken as user variable which you can access with response.locals.user, otherwise, it will send 401 response.

The middleware can also be applied to other routes as well, feel free to custom it your way.

Have existing Express server?

Maybe you already have Express server, then you can install the standalone middleware https://github.com/antonybudianto/express-firebase-middleware

Please give a ⭐️ to support this starter!

Clone this wiki locally