Skip to content

Conversation

@buraks
Copy link

@buraks buraks commented Jul 7, 2017

When a user logs in with Facebook, the userData is in the following format:

{
  email: ...
  displayName: ...
  providerData: [
    {
      email: ...
      photoURL: ...
      providerId: facebook.com
      uid: ...
      displayName: ...
      ...
    }
  ]
  ...
}

there is no user in userData so it was failing creating the profile. This pr fixes that.


// For email auth return uid (createUser is used for creating a profile)
if (userData.email) return userData.uid
if (method === 'signInWithEmailAndPassword') return userData.uid
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Exactly what I was thinking.

@prescottprue prescottprue merged commit 1b9970a into prescottprue:v2.0.0-beta.2-stable Jul 7, 2017
@buraks buraks deleted the fix-createUserProfile branch July 8, 2017 01:24
This was referenced Jul 10, 2017
prescottprue added a commit that referenced this pull request Jul 14, 2017
* Node v8 support (`package.lock.json` added, and `8` added to node versions in travis config)
* `credential` support for login method - #186
* createUserProfile called with Facebook authentication - #187
* Switched back to using constructor to set context vars (attempt to fix undefined vars in component mount)
* Merged changes that set `displayName` and `wrappedComponent`
* Docs sections `redux-observable` and `epics` combined
* Docs updated with changes to compose function (no longer supports passing fbConfig)
* Docs added about `presence` and `sessions` config options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants