Firebase v3 GoogleAuthProvider not saving email -


(1) question:

is there way read user email having uid? (permitted super user or server)

ps.: don't want save in realtime database, because though current user can change it, can erase or put fake email..

(2) problem:

i'm trying retrieve user email googleauthprovider in firebase v3

thats code i'm using:

  signinwithgoogle(): promise<any> {     let provider = new firebase.auth.googleauthprovider();     provider.addscope("https://www.googleapis.com/auth/userinfo.email");     return firebase.auth().signinwithpopup(provider)             .then((result) => {               console.log(result.user.email);               console.log(result.credential);               let token = result.credential.accesstoken;               return this.createorupdateuser(result.user, token);             });   } 

the result:

result.user.email # null result.user.providerdata[0].email # correct_email@gmail.com 

firebase auth dashboard though email in providerdata, not attached auth.. firebase bug or can fix somehow?

thanks!

the 3.2.0 web sdk launched yesterday should automatically ask profile scope when signinwithpopup google provider. try deleting test user , sign in again. top level email should populated.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -