Re: [Firebase] Auth Google Email Null

340 views
Skip to first unread message

Kato Richardson

unread,
Oct 28, 2020, 11:44:47 AM10/28/20
to Firebase Google Group
Hi Renato,

See step 1 here. You need to add requestEmail() to your Google Sign In credentials.

☼, Kato 

On Tue, Oct 27, 2020 at 11:43 PM Renato Dolza <renat...@gmail.com> wrote:
After connecting via google auth, the return of the email comes as null, why is that? what am i doing wrong? I need this return information.

A part of my code, where the user's email return is null:

firebase.auth().signInWithRedirect(provider).then(function(result) {
    firebase.auth().getRedirectResult().then(function(result) {
        var cred = result.credential;
        var user = result.user;
        console.log(user.email);
    })
})

--
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-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/315e2b8a-4a0b-43d7-9d33-44eb825a4ed7n%40googlegroups.com.


--

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

Reply all
Reply to author
Forward
0 new messages