UdacityMobileWebScholarship / guess-quote

This application is a collaborative project made by the Google Udacity Mobile Web Specialist Scholars.
MIT License
22 stars 48 forks source link

Social Sign in using Facebook, Google or any other clients. #31

Open anurag-majumdar opened 6 years ago

anurag-majumdar commented 6 years ago

Hi guys, I came up with a flow regarding the Social login process using Fb, Google or any other such accounts.

Here is the flow diagram: social login flow

The official fb and gapi for client sdk.

To make use of the following diagram flow, we need to use the following packages in our Node server: passport-facebook-token passport-google-token

I have followed this logic before in applications where I have worked on and it works perfectly fine. If the idea is accepted will document this in readme file as a standard guide section for social sign up.

Let me know what you guys think.

parmeet1402 commented 6 years ago

@twishasaraiya @anurag-majumdar

So i got links to JavaScript code that we could use to have Google and Facebook integration in our web app. If the mods and co-mods I could try to implement in our app.

Google Sign in integration Facebook Sign in integration

anurag-majumdar commented 6 years ago

@parmeet1402 This is exactly what I was talking about. In one of my github projects I have used both the SDKs which you gave in the links. I can help setup the API key and secrets as I have experience with them as well as how the app should interact with the sign in strategies.

parmeet1402 commented 6 years ago

@anurag-majumdar Oh Okay gotcha man! I haven't implemented it before. It would be really great if you would let me do it with you, I would be able to learn, how to do it in reality.

anurag-majumdar commented 6 years ago

@parmeet1402 Sure! Since this is a collaborative project, I think the mods and co-mods will break this functionality into chunks and all of us interested can work on this. This authentication will require code changes in both front and back end.

parmeet1402 commented 6 years ago

@anurag-majumdar Yup we would be required to make some changes.

anurag-majumdar commented 6 years ago

@parmeet1402 Exactly! We can help each other in code and give guidance as to how to approach a specific part of the process, once each part of the process gets assigned.

twishasaraiya commented 6 years ago

Thank you guys for bringing up this issue. Okay since the user can play without logging in, we will be providing only one social login for now(it can be anything facebook, google etc). Besides that, I would like to say that since I haven't implemented REST API before so we will wait for others moderators. @skyshader, @danivijay what do you think??

anurag-majumdar commented 6 years ago

@twishasaraiya you are right about the social login part. We can keep only one for this app. I have implemented these features before in 1 day's time when there was a lot of pressure in my projects and am quite comfortable with this area. Lets discuss more with other co-mods regarding this.

I also believe that we should break up the tasks so that most of the people get a chance to contribute. After all this is a collaborative project. If it had not been collaborative I can implement these features from front to back in the least time possible. 😃

skyshader commented 6 years ago

Hey guys, so we discussed this before on issue #8

And for first cut we decided to go with a basic username, password authentication. For the reasons check issue #8

However, after the first cut, surely we are focusing on Login with Google and we can close this discussion till then? Let me know your thoughts.

Sahil-Dhawan commented 6 years ago

using google auth api is easy and yes @anurag-majumdar access token + refresh token .You might want to edit that for people unaware of the accesstoken expiry and refresh procedure i.e new to auth2.0

ayushdev commented 6 years ago

I can implement the Google Login through Firebase SDK.

LoneWolf36 commented 6 years ago

@ayushdev Google Login using FIrebase SDK in React? Count me in! I was working on it recently! I could help out with it and gain some experience from you on how to make it work. How do we collaborate?

naveens239 commented 6 years ago

I too have used google auth api and integration with this is easier. So I vote for google too.

danivijay commented 6 years ago

@ayushdev @LoneWolf36 As we got our own back-end, I think we can implement the same without 3rd party, ie Firebase, if necessary.

As a first step, we are implementing basic auth with email and password. I think social logins can be added via passport, as @anurag-majumdar mentioned on the first post.

ayushdev commented 6 years ago

@LoneWolf36 @danivijay As the app is not so complicated, we can implement that using our own backend. I am in favour of whatever tools get the work done in a short time.

Sahil-Dhawan commented 6 years ago

I agree with @ayushdev on this 😄

anurag-majumdar commented 6 years ago

I would like to work on this part too. Let's divide it into chunks I guess.