cornellh4i / lagos-volunteers

Lagos Food Bank Volunteer Management System
https://lagos-volunteers.vercel.app
MIT License
13 stars 6 forks source link

Log in with Google #243

Closed owenchen04 closed 4 months ago

owenchen04 commented 6 months ago

Summary

Allowed users to create an account and sign-in using the 'Continue with Google' button. The flow is the same regardless of whether they are using Google to log in for the first time or they are a returning user.

Testing

Manually tested by using my personal Google account. Made sure that in both cases (first time signing in vs. returning user), continue with Google worked as expected (creating a user in the local database in the former case). Also used console.log to ensure that the created firebase user had emailVerified already set to true.

Notes

I was having issues using the react-firebase-hooks useSignInWithGoogle hook, as the googleUser object returned by the hook was always undefined. Instead, I followed the official firebase documentation. While the flow seems fine for now, there is a possibility that there are errors I couldn't account for.

Closes #236

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lagos-volunteers ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 5:21am
jasozh commented 4 months ago

Thinking about potential issues:

New additions