Swarnim01 / Movie_Listing_Webapp

https://movielistingapp.herokuapp.com/
1 stars 13 forks source link

Added Google oAuth #28

Closed Manoramsharma closed 3 years ago

Manoramsharma commented 3 years ago

Description : Added google auth to the given movie_listing_webaap .

Files changed

  1. Backend app.js>>const GoogleSignInRouter = require("./routes/googlelogin"); app.use("/googlelogin", GoogleSignInRouter); routes>>googlelogin.js models>>user>> password: { type: String, }, /Password via google oAuth is not required/ package.json>>"googleapis": "^88.2.0" , "passport": "^0.5.0"
  1. Frontend

    App.js>> history.replace("/home/1"); components>>Login.js

  2. How to run the app : Update the ".env" file in the below format with the given "GOOGLE_CLIENT_ID">> MONGOURI=your own active cluster URI JWT_SECRET=someRandomString NODE_ENV=development

ACCESS_TOKEN_SECRET = myaccesstokensecret REFRESH_TOKEN_SECRET = myrefreshtokensecret

GOOGLE_CLIENT_ID = 609352835063-nbhju2f1sluankm9n3itapdvr4d0aejc.apps.googleusercontent.com

Swarnim01 commented 3 years ago

@Manoramsharma checked the changes. Good Work But change in server app.js of process.env.NODE_ENV === 'Production' isn't correct. Why you made this change?

Changing this will cause no file to server on deployment and will result in a blank screen or some error. Correct it , also update master , remove merge conflict and make a PR again.

Manoramsharma commented 3 years ago

@Swarnim01 done the asked changes , updated the master and resolved the conflicts.

only I can see is a slight change in alignment of "sign in" button , I hope you can manage that.

Swarnim01 commented 3 years ago

@Manoramsharma Just compare the deployed Login page UI with yours after the changes you made, it's not looking good image The shadows around the NetFlex heading is due to the container class used for the whole container and has the background image too which got restricted to Netflix div due your change and that's the reason there is no background inside the LOGIN/SIGNUP container.

There was no need to change the Login.js div classes and styles part ANYWAYS because all you needed was a button of Google Auth beside Normal Login/Signup button.

Do the necessary changes and make a PR again.

Manoramsharma commented 3 years ago

@Swarnim01 done with the asked changes .

Swarnim01 commented 3 years ago

Great