-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log in with Google #243
Log in with Google #243
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi guys!
Nice work on this. I tested it and it works fine! However, I noticed some things that will need your attention. Please see my comments
// console.log("creating user"); | ||
await createLocalUserFromGoogle.mutateAsync({userid, firstName, lastName, email, phoneNumber}); | ||
} else { | ||
// console.log("user already created"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 you're missing this else case
Thinking about potential issues:
New additions
|
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