Data4Democracy / ati-broadcastapp

The ATI Broadcast app group is building a Facebook publishing app for the group America the Indivisible. Via this app an AITD trusted partner will be able to broadcast a message to multiply Facebook groups from one interface. This will allow the local groups in a region, of which there are many, to better communicate and mobilize toward specific actions.
MIT License
7 stars 2 forks source link

Added basic login functionality to Header.jsx. #17

Closed nausicaa-rose closed 7 years ago

nausicaa-rose commented 7 years ago

Added ability to login with Gooogle to Header.jsx. Relies on react-google-login package https://github.com/anthonyjgrove/react-google-login/. Added package to package.json.

Sorry this took longer than expected. I had apparently deleted or written over the original implementation somehow and had to rewrite it.

jonganc commented 7 years ago

This looks good. Once we figure out how exactly how we implement users being logged in, we can add that. It looks like we can see who the users are by either looking at response.googleId (which is a numeric Google ID, whatever that is) or response.profileObj.email (which is an e-mail, probably what we can use). Then we can either use JSON Web Tokens or some kind of session storage for authenticating further requests. I'm going to make a further pull request in a moment that adds a google client ID for testing.