wevote / Campaigns

America wins when more voters participate. Trying to win a race on election day? Running a voter registration drive? Start a campaign
MIT License
0 stars 3 forks source link

voterFacebookSaveToCurrentAccount needed for FacebookSignIn #42

Open DaleMcGrew opened 3 years ago

DaleMcGrew commented 3 years ago

In testing the addition of Facebook sign in to Campaigns, I found one situation where it isn't working. When the email associated with Facebook is not in WeVoteServer database (Email or Voter email), the Facebook sign in fails. If you then sign in with email (using a verification code emailed to you), and sign out, Facebook sign in will work the second time (after the email address has been created in WeVoteServer).

To fix this, when you sign in, we need to support calling the API voterFacebookSaveToCurrentAccount (an alternate to voterMergeTwoAccountsByFacebookKey) in this file: Campaigns/src/js/components/Facebook/FacebookSignIn.jsx

I have pasted in the code (commented out) that was used in WebApp to call this API.

SailingSteve commented 3 years ago

This is resolved by a prior PR

SailingSteve commented 3 years ago

Dale McGrew 5:01 PM Hi Steve, Facebook sign in works on my local machine on a Campaign URL, yay! It doesn’t seem to be bringing over any information from Facebook though (first/last name, photo, etc.) I wonder if it is related to voterFacebookSaveToCurrentAccount and/or voterMergeTwoAccountsByFacebookKey mentioned in this: (issue 42)