Giter VIP home page Giter VIP logo

nodefire's Introduction

nodeFire

AngularFire with token authentication on Node backend server

Get Started with nodeFire

  1. Run these commands to add the project locally:
$ git clone https://github.com/LukeSchlangen/nodeFire
$ cd nodeFire
$ npm install
  1. Create a free Firebase account at https://firebase.google.com

  2. Create a project from your Firebase account console

  3. Add a connection to firebase on your front end

  4. Click the “Add Firebase to your web app” icon

  5. Copy the contents WITHOUT SCRIPT TAGS or the CDN from the resulting popup into public/config.js. It should look like this:

```javascript
  // Initialize Firebase
  var config = {
    apiKey: "XXXXXXXXXXXXXXXXXXXXXX",
    authDomain: "XXXXXXXXXXXX.firebaseapp.com",
    databaseURL: "https://XXXXXXXXXXXX.firebaseio.com",
    storageBucket: "XXXXXXXXXXXX.appspot.com",
    messagingSenderId: "XXXXXXXXXX"
  };
  firebase.initializeApp(config);
```
  1. Add a firebase service account to you node project
  2. Navigate to the Service Accounts tab in your project's settings page.
  3. Select your Firebase project.
  4. Copy your databaseURL from the Admin SDK configuration snippet. The line you need will look like this: databaseURL: "https://XXXXXXXXX.firebaseio.com".
  5. Navigate to the server/modules/decoder.js file in the node project and replace the databaseURL. Only replace that line. It is inside of the admin.initializeApp:
```javascript
admin.initializeApp({
  credential: admin.credential.cert("./server/firebase-service-account.json"),
  databaseURL: "https://XXXXXXXXX.firebaseio.com" // replace this line with your URL
});
```
  1. Return to firebase Service Accounts. Navigate to your project again if you have left it.

  2. Click the Generate New Private Key button at the bottom of the Firebase Admin SDK section of the Service Accounts tab.

  3. Rename the new JSON file to firebase-service-account.json and save it in the server folder of your application.

  4. Return to Firebase console. Configure Google as an authentication provider for your Firebase project.

  5. In the Firebase console for your project (you may already be there from the previous step), click "Authentication" in left panel

  6. Click "Set Up Sign-In Method" button

  7. Select "Google"

  8. Click the "edit" icon

  9. Toggle Google to on

  10. Run npm start to run your application on localhost:5000

##Contributing

  1. The repository is open to contribution from all interested developers. Kindly send us Pull Requests with explanation as to what changes you have done.
  2. Also, you can write to us by opening an Issue and also solve a current issue if possible.

##License

  1. The software is registered under the MIT License

nodefire's People

Contributors

lukeschlangen avatar aethmos avatar hillaryfraley avatar sbshah97 avatar xtalosc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.