{"id":26339651,"url":"https://github.com/kmaida/firebase-auth0-nodeserver","last_synced_at":"2026-04-30T08:37:09.536Z","repository":{"id":27385910,"uuid":"113711421","full_name":"kmaida/firebase-auth0-nodeserver","owner":"kmaida","description":"Node server authorized with Auth0 that generates and returns a custom Firebase token","archived":false,"fork":false,"pushed_at":"2024-12-23T06:00:35.000Z","size":446,"stargazers_count":0,"open_issues_count":31,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-23T07:18:33.532Z","etag":null,"topics":["api","auth0","authentication","firebase","nodejs","webserver"],"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/kmaida.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-10T00:28:57.000Z","updated_at":"2017-12-13T18:27:29.000Z","dependencies_parsed_at":"2023-12-06T20:25:33.393Z","dependency_job_id":"71ebde97-d12f-48ed-924c-60ec1e63a1d0","html_url":"https://github.com/kmaida/firebase-auth0-nodeserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaida%2Ffirebase-auth0-nodeserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaida%2Ffirebase-auth0-nodeserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaida%2Ffirebase-auth0-nodeserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmaida%2Ffirebase-auth0-nodeserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmaida","download_url":"https://codeload.github.com/kmaida/firebase-auth0-nodeserver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818398,"owners_count":20352664,"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":["api","auth0","authentication","firebase","nodejs","webserver"],"created_at":"2025-03-16T03:18:43.871Z","updated_at":"2025-10-05T02:39:39.904Z","avatar_url":"https://github.com/kmaida.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js Firebase + Auth0 Authentication Server\n\n\u003e Follow this tutorial to learn how to authenticate a Node.js server and Angular app with Cloud Firestore database using Auth0: [How to Authenticate Firebase and Angular with Auth0](https://auth0.com/blog/how-to-authenticate-firebase-and-angular-with-auth0-part-1/).\n\nThis is an implementation of a Node server that enables authentication of [Firebase](https://firebase.google.com/) after a user has logged into an app with [Auth0](https://auth0.com).\n\nThe user should log into Auth0 on the client. The client app should then call the secure `/auth/firebase` endpoint to acquire a Firebase token, which can be used to securely access Firebase real-time databases in the client app.\n\n(The proposed use of this server is to build an app that will display dog information and allow people to comment on the dog breeds in real-time using Firebase.)\n\n## Dependencies\n\nYou must have:\n\n* [Node.js and npm](https://nodejs.org) installed\n* An [Auth0](https://auth0.com) account with a [Client app](https://manage.auth0.com/#/clients)\n* An [Auth0 API](https://manage.auth0.com/#/apis) with a name, identifier `http://localhost:1337/`, and algorithm `RS256`\n* A [client-facing application](https://auth0.com/docs/quickstarts) where users can log in with Auth0\n* A [Firebase project](https://console.firebase.google.com/u/0/) with [security enabled](https://firebase.google.com/docs/database/security/quickstart#sample-rules) for Real-Time Database\n* A [Service Account](https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk) for your Firebase project with a **private key** generated (should download as a `.json` file)\n\n## Setup\n\nClone this repository and run:\n\n```\n$ npm install\n```\n\nDownload the private key JSON file from your Firebase [Service Account](https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk) to this project's `/firebase` folder.\n\nRemove the `.example` extension from the `config.js.example` file and add the appropriate configuration to the file.\n\nTo start the webserver, run:\n\n```\n$ node server\n```\n\nThe server will be available in the browser at `http://localhost:1337`. Accessing the `/auth/firebase` route requires an Auth0 access token, acquired and sent as an `Authorization` header (`Bearer` type) by your client application with the HTTP request.\n\n## Endpoints\n\n### /auth/firebase (protected)\n\nThis protected endpoint will return:\n\n```\n{\n  firebaseToken: {Custom Firebase Token object}\n}\n```\n\n### /api/dogs (public)\n\nThis public endpoint returns an array of the 10 most popular dogs in the US in 2016, ranked by the AKC. The data takes the following shape:\n\n```\n[\n  {\n    \"breed\": string,\n    \"rank\": number (1-10),\n    \"image\": string (URL to CC0 Creative Commons image)\n  },\n  ...\n]\n```\n\n### /api/dog/:rank (protected)\n\nThis protected endpoint returns a single dog object of the `rank` specified in the request parameters. The data takes the following shape:\n\n```\n{\n  \"breed\": string,\n  \"rank\": number (1-10),\n  \"description\": string,\n  \"personality\": string,\n  \"energy\": string,\n  \"group\": string,\n  \"image\": string (URL to CC0 Creative Commons image),\n  \"link\": string (URL to AKC breed information)\n}\n```\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmaida%2Ffirebase-auth0-nodeserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmaida%2Ffirebase-auth0-nodeserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmaida%2Ffirebase-auth0-nodeserver/lists"}