Girl-Code-It / Opportunity-Calendar-Frontend

Opportunity Calendar is the one-stop place to refer important opportunites available in tech-space like newly posted jobs, internships, hackathons, tech-conferences, scholarhsips etc.
https://cutt.ly/opportunity-calendar
MIT License
49 stars 88 forks source link

want to implement google Google SignIn #158

Closed abhay27chauhan closed 3 years ago

abhay27chauhan commented 3 years ago

Feature request:

want to implement google sign in

your code ->

Screenshot 2021-03-27 at 2 13 10 PM

Describe the solution you'd like:

my solution ->

Screenshot 2021-03-27 at 5 08 25 PM

Screenshot 2021-03-27 at 5 08 37 PM

Screenshot 2021-03-27 at 5 08 54 PM

Screenshot 2021-03-27 at 2 23 44 PM

abhay27chauhan commented 3 years ago

can i do it?

abdus commented 3 years ago

Please make a PR with the proposed changes. We cannot test codes from screenshots.

P.S.: don't start working on any issue until it's assigned to you. Otherwise, there will be chances of duplicate work (which is not good). for now, I am assigning this issue to you. but please keep this in mind.

ay2306 commented 3 years ago

@abdus We were working on this issue in the backend since onboarding is related to personalizing API response data as per user and authenticating various operations for the user. Please review the strategy I had in mind for Register/Login Users from the backend.

  1. Redirect to {backend-url}/auth/google-authenticate, from the front-end, and then login/register logic is handled at the server
  2. Generate a JWT for the user UUID and pass it to the front-end using path query.

The reason I suggest this:

  1. Client Secrets will be better secure at the backend
  2. Single Route accepting JWT for any login/register strategy will make it simple for the front-end while logic for all those still needs to be maintained at the backend, this is also simpler when adding new login/register strategies to the app.

Please see this issue and verify the strategy: Backend Issue 33