Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

email is not a property of LoginResult #71

Closed
t-moe opened this issue Jul 11, 2016 · 1 comment
Closed

email is not a property of LoginResult #71

t-moe opened this issue Jul 11, 2016 · 1 comment

Comments

@t-moe
Copy link
Collaborator

t-moe commented Jul 11, 2016

The example provided in your docs:

firebase.init({
    onAuthStateChanged: function(data) { // optional but useful to immediately re-logon the user when he re-visits your app
      console.log(data.loggedIn ? "Logged in to firebase" : "Logged out from firebase");
      if (data.loggedIn) {
        console.log("user's email address: " + (data.user.email ? data.user.email : "N/A"));
      }
    }
  });

doesn't work, because LoginResult has no (optional) email property.

export interface LoginResult {
      uid: string;
      provider: LoginType;
      expiresAtUnixEpochSeconds: number;
      profileImageURL?: string;
      token: string;
    }
@EddyVerbruggen
Copy link
Owner

It's returned but it wasn't part of the TS definition. I've added that now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants