ProjectProtege / protege

Remote jobs for junior developers
protege.vercel.app
MIT License
67 stars 39 forks source link

Github sign in button not working #309

Open carmenkolohe opened 3 years ago

carmenkolohe commented 3 years ago

Describe the bug

I went to sign up and wanted to sign in with Github. The button to sign in with Github does not seem to be working. I dug into the code and it looks like const { currentUser, signin, signInWithGithub } = useAuth() the signInWithGithub does not seem to exist.

To Reproduce

Steps to reproduce the behavior:

  1. Go to http://localhost:3000/sign-up?accountType=candidate
  2. Click on Sign in with Github
  3. Nothing happens

Expected behavior

I expect to be sign in with my Github account.

Screenshots

Screen Shot 2021-06-14 at 8 27 23 PM (2)

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Add any other context about the problem here.

github-actions[bot] commented 3 years ago

Thanks so much for submitting an issue! We have received it, will review it soon and follow up. For our contibution guidelines, please check out our contributors guide.

clandau commented 3 years ago

I have some time this week I could build this out. @drewclem

carmenkolohe commented 3 years ago

I'd be open to working on this or enhancing it later on. Since Firebase is being used for the project, I suggest taking a look at the FirebaseUI they offer. https://firebase.google.com/docs/auth/web/firebaseui I have implemented the FirebaseUI for past projects. If you are open to this I can build it along with other platforms for a user to sign in with (Twitter, Google).

nickytonline commented 3 years ago

When creating an account via GitHub, we'll need to ensure the same documents for a regular sign up are created.

Also note that GitHub sign in will only be available for candidates, not companies, as companies typically do not have a GitHub account, usually just GitHub organizations.

Let me know if I missed anything @drewclem.

carmenkolohe commented 3 years ago

For the actual GitHub signin, would you be open to authenticating with Firebase like this? var provider = new firebase.auth.GithubAuthProvider(); https://firebase.google.com/docs/auth/web/github-auth

nickytonline commented 3 years ago

This makes sense to me, or are there any reservations to using Firebase's GitHub auth provider @drewclem, @sethburtonhall, @clandau?

clandau commented 3 years ago

This makes sense to me, or are there any reservations to using Firebase's GitHub auth provider @drewclem, @sethburtonhall, @clandau?

None here, I think it's a good idea to use Firebase auth.