{"id":16107008,"url":"https://github.com/mikeesto/firebase-auth-example","last_synced_at":"2026-01-16T00:56:52.263Z","repository":{"id":38794510,"uuid":"222617539","full_name":"mikeesto/firebase-auth-example","owner":"mikeesto","description":"🔑An example app using Firebase authentication with React \u0026 Express","archived":false,"fork":false,"pushed_at":"2023-01-09T12:01:49.000Z","size":504,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T00:44:17.672Z","etag":null,"topics":["express","firebase","firebase-auth","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikeesto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-19T05:43:31.000Z","updated_at":"2020-02-25T03:59:32.000Z","dependencies_parsed_at":"2022-08-25T09:41:31.992Z","dependency_job_id":null,"html_url":"https://github.com/mikeesto/firebase-auth-example","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/mikeesto%2Ffirebase-auth-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Ffirebase-auth-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Ffirebase-auth-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikeesto%2Ffirebase-auth-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikeesto","download_url":"https://codeload.github.com/mikeesto/firebase-auth-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246794027,"owners_count":20834931,"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","firebase","firebase-auth","react"],"created_at":"2024-10-09T19:14:54.391Z","updated_at":"2026-01-16T00:56:52.223Z","avatar_url":"https://github.com/mikeesto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔑 Firebase Authentication Example\n\nAn example app using Firebase authentication in React \u0026 Express.\n\n![app screenshot](screenshot.png)\n\n## How to run\n\n### Firebase\n\n1. Set up a Firebase project at `https://console.firebase.google.com/`\n\n2. Select `Authentication` from the left hand menu and enable `Email/Password`\n\n### Client (React)\n\n3.  Obtain the necessary client credentials from Firebase. On the left hand Firebase menu, click the ⚙️(settings icon), then select `Project Settings`. In the `Your apps` card, select a web app `\u003c/\u003e`, provide an app nickname and then copy the generated credentials. The credentials should have the form:\n\n```\n  apiKey: \"XXXX\",\n  authDomain: \"XXXX\",\n  databaseURL: \"XXXX\",\n  projectId: \"XXXX\",\n  storageBucket: \"XXXX\",\n  messagingSenderId: \"XXXX\",\n  appId: \"XXXX\"\n```\n\n4. Create a new file named `firebaseConfig.js` in the `/client/src/config/` folder. Assign the credentials to a variable and export it as `firebaseConfig`. For example:\n\n```\nconst firebaseConfig = {\n  // credentials here!\n};\n\nexport default firebaseConfig;\n```\n\n5. The file is imported in `/client/src/App.js` on line 7. If the above instructions are followed, there is no need to change this line.\n\n6. Run the React app:\n\n\u003e \u003e `npm install`\n\n\u003e \u003e `npm start`\n\n\u003e \u003e React app will be available on `localhost:3000`\n\n### Server (Express)\n\n7. Obtain the necessary server credentials from Firebase. On the left hand Firebase menu, click the ⚙️(settings icon), then select `Project Settings` and then the `Service accounts` tab. In the `Firebase Admin SDK` click to `Generate new private key`. The credentials should have the form:\n\n```\n{\n  \"type\": \"XXXX\",\n  \"project_id\": \"XXXX\",\n  \"private_key_id\": \"XXXX\",\n  \"private_key\": \"XXXX\",\n  \"client_email\": \"XXXX\",\n  \"client_id\": \"XXXX\",\n  \"auth_uri\": \"XXXX\",\n  \"token_uri\": \"XXXX\",\n  \"auth_provider_x509_cert_url\": \"XXXX\",\n  \"client_x509_cert_url\": \"XXXX\"\n}\n```\n\nThese credentials contain a private key that should be kept secret (i.e. not shared or committed to Git)\n\n8. Create a file named `firebaseKey.json` in `/server/config/` and store the above credentials.\n\n9. In `/server/server.js` the credentials are required on line 15. If the above instructions are followed, there is no need to change this line.\n\n10. On line 20, the database URL will need to be updated. This URL will be available in the previously generated Firebase `Admin SDK configuration snippet`.\n\n11. Run the server\n\n\u003e \u003e `npm install`\n\n\u003e \u003e `node server.js`\n\n\u003e \u003e Server will run on `localhost:3001`\n\nThe server route '`/`' will not be accessible without authenticating.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeesto%2Ffirebase-auth-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikeesto%2Ffirebase-auth-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikeesto%2Ffirebase-auth-example/lists"}