Authentication with Firebase Simple Login


#1

I can’t find the answer on Firebase Google Group. The google group is too chaotic. I prefer this forum. Anyone has this problem?


#2

nevermind. found the solution.


#3

It might be helpful to others if you share the solution.


#4

I am using https://www.firebase.com/docs/security/simple-login-overview.html, facebook (https://www.firebase.com/docs/security/simple-login-facebook.html). I placed https://auth.firebase.com/auth/facebook/callback in the wrong location. The correct location: "Facebook application configuration, go to the “Settings” tab and set your ‘Site URL’. (https://developers.facebook.com/apps)


#5

@Calendee We should open a separate forum category here for ‘General app development’ or ‘AngularJS questions’.

It seems that the Ionic community wants to help each other out even if their problems arent directly Ionic related but now all these questions are asked in the ‘Ionic’ forum.


#6

We had a bunch of other categories for a while. It just got confusing. It’s hard to know where to post; so Max pulled them all.


#7

Ah ok. Haha.

Let’s just make one big confusing category instead of multiple confusing categories. Makes sense, seems like less confusion this way :wink:


#8

Hi @rdtran

Did you get Firebase Simple Login working with Ionic?
Could you post an example?


#9

insert it in your controller. you can look at this, https://www.firebase.com/docs/angular/reference.html

  // perform the login auth
    var chatRef = new Firebase('https://your-firebase-name.firebaseio.com');
    var auth = new FirebaseSimpleLogin(chatRef, function(error, user) {
      if (error) {
        // an error occurred while attempting login
        console.log(error);
      } else if (user) {
        // user authenticated with Firebase
        console.log('User ID: ' + user.id + ', Provider: ' + user.provider);
      } else {
        // user is logged out
      }
    });
    
    auth.login('facebook');	

angularFire simpleLogin with Ionic