Getting additional data from Firebase Auth Facebook Login

188 views
Skip to first unread message

Marco Dal Zovo

unread,
Aug 25, 2016, 11:01:49 AM8/25/16
to Firebase Google Group
I'm developing an application with Firebase Web and Javascript. I built a Facebook Login, but i can't understand how to access the scopeData i requested in the sign-in step. Here is my signInWithRedirect and getRedirectResult code:

// signInWithRedirect
var provider = new firebase.auth.FacebookAuthProvider();
provider
.addScope('user_birthday');
provider
.addScope('user_friends');
firebase
.auth().signInWithRedirect(provider);

// getRedirectResult
firebase
.auth().getRedirectResult().then(function(result){
if(result.credential)
 
var token = result.credential.accessToken;
 
var user = result.user;
}).catch(function(error){
  console
.log(error.code);
  console
.log(error.message);
});


Kato Richardson

unread,
Aug 25, 2016, 12:07:35 PM8/25/16
to Firebase Google Group

HI Marco,

I think you’re looking for providerData as described here and here.

☼, Kato


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/b190f28b-6e74-44bf-9439-b93eb2528df3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages