{"id":13778487,"url":"https://github.com/antonybudianto/express-firebase-middleware","last_synced_at":"2025-03-16T21:30:42.188Z","repository":{"id":47415403,"uuid":"78258101","full_name":"antonybudianto/express-firebase-middleware","owner":"antonybudianto","description":":fire: Express middleware for your Firebase applications","archived":false,"fork":false,"pushed_at":"2022-12-04T03:11:11.000Z","size":1273,"stargazers_count":51,"open_issues_count":9,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-30T03:21:51.128Z","etag":null,"topics":["express","express-middleware","firebase","firebase-admin","firebase-auth","middleware"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonybudianto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-07T04:19:22.000Z","updated_at":"2023-11-25T23:44:30.000Z","dependencies_parsed_at":"2023-01-22T18:00:16.838Z","dependency_job_id":null,"html_url":"https://github.com/antonybudianto/express-firebase-middleware","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonybudianto%2Fexpress-firebase-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonybudianto%2Fexpress-firebase-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonybudianto%2Fexpress-firebase-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonybudianto%2Fexpress-firebase-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonybudianto","download_url":"https://codeload.github.com/antonybudianto/express-firebase-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830933,"owners_count":20354852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","express-middleware","firebase","firebase-admin","firebase-auth","middleware"],"created_at":"2024-08-03T18:00:54.194Z","updated_at":"2025-03-16T21:30:41.860Z","avatar_url":"https://github.com/antonybudianto.png","language":"JavaScript","funding_links":[],"categories":["Helpers"],"sub_categories":[],"readme":"# Express Firebase Middleware\n\nExpress middleware for your Firebase applications.\n\n[![npm version](https://badge.fury.io/js/express-firebase-middleware.svg)](https://badge.fury.io/js/express-firebase-middleware)\n\n\u003e Starting new express firebase project? try out [Express Firebase](https://github.com/antonybudianto/express-firebase) starter\n\n## Minimum requirements\n- Node 6 or later\n- npm 3 or later\n- Firebase account\n\n## How to use\n1. Install the packages using npm\n    ```sh\n    npm install express firebase-admin express-firebase-middleware\n    ```\n\n   Both `express` and `firebase-admin` are peerDependencies.\n\n2. Require it in your express routes\n    ```js\n    var firebaseMiddleware = require('express-firebase-middleware');\n\n    router.use('/api', firebaseMiddleware.auth);\n    ```\n\n3. Now make sure the client's requests have Authorization header like\n    ```\n    Authorization: Bearer \u003cyour-client-token\u003e\n    ```\n\n    The client can [get the token](https://firebase.google.com/docs/auth/admin/verify-id-tokens) from their client SDK (Web, Android, iOS Firebase SDK)\n\n4. When requesting, and token is valid, you can get the `user` object from response\n    ```js\n    router.get('/api/hello', (req, res) =\u003e {\n        res.json({\n            message: `You're logged in as ${res.locals.user.email} with Firebase UID: ${res.locals.user.uid}`\n        });\n    });\n    ```\n\n## Debug mode\nBy default, the middleware will log and output to console, you can disable them by setting\nyour environment variable for `APP_DEBUG` to `false`\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonybudianto%2Fexpress-firebase-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonybudianto%2Fexpress-firebase-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonybudianto%2Fexpress-firebase-middleware/lists"}