Setup angular4 with firebase authenticate

Source from https://coursetro.com/posts/code/31/How-to-Make-an-Angular-Firebase-Chat-App

Go to firebase home page https://console.firebase.google.com/project/kindergarden-management/overview.

click “Create New Project“. Give it a project name such as “mychatapp” and click “Create Project“.

Click on Add Firebase to your web app, then copy the config, this will be in your app module of angular. There are 2 more option you can create, on android app & ios app.

https://www.gstatic.com/firebasejs/4.1.3/firebase.js

// Initialize Firebase
var config = {
apiKey: “AIzaSyA5LwuidkA8ubv24Vw2VaJ7lIgn39_OOKU”,
authDomain: “kindergarden-management.firebaseapp.com”,
databaseURL: “https://kindergarden-management.firebaseio.com”,
projectId: “kindergarden-management”,
storageBucket: “”,
messagingSenderId: “1015344435370”
};
firebase.initializeApp(config);

  • Click on left menu Authentication: -> Sign in method
  • Then choose facebook, turn it on, enter fb appId and secret

https://kindergarden-management.firebaseapp.com/__/auth/handler

  • Then go back to facebook, create new app login in product left menu.
  • Copy rule from firebase’s database menu.
  • {
    “rules”: {
    “.read”: “auth != null”,
    “.write”: “auth != null”
    }
    }
This entry was posted in AngularJs. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s