Plots2: Add "Log in with Facebook" for new accounts

Created on 17 Aug 2016  ·  45Comments  ·  Source: publiclab/plots2

(later following up with twitter/other social media)

OmniAuth is a great starting point: https://github.com/omniauth/omniauth

Let's begin with Facebook!

See these "strategies" to support FB, Twitter, Google, etc:

https://github.com/omniauth/omniauth/wiki/List-of-Strategies


@steviepubliclab - starting this issue here :)

break-me-up help wanted outreach

Most helpful comment

Yeah fb login can be the first step, actually I read the post after writing the answer to you on this. I am happy to help at step 1.

All 45 comments

I would like to give this issue a try.
Would begin working on the links that @jywarren has posted.

Could we make use of omniauth?
Easier for multi-site login system.

Hi, sorry for my late reply -- looking at it now: https://github.com/omniauth/omniauth

So would we then be able to install multiple of these "strategies" to support FB, Twitter, Google, etc?

https://github.com/omniauth/omniauth/wiki/List-of-Strategies

Thanks for writing back!

If you'd like to add those gems and open a pull request, I'd love to review, thanks!

Can devise gem be used here for implementing the "login with social media account" functionality?

@athityakumar You don't need devise to implement this. devise is itself is an complete authentication solution. We have authlogic for that already. You need to use gems like facebook-omniauth (for facebook login) and similar for google and twitter.

Oh, ok. Can I be assigned this issue if it hasn't been already assigned? I'll go through the codebase, make the changes and send a PR by Mar 10th.

Yeah sure go for it!

Yes @jywarren , it would allow us to implement login through more sites as the need arises.

@jywarren I have already contributed to wiki pages and integrating the PublicLab Rich editor on plots2 and have good experience with it. I would like to take this up as my GSoC 2017 project. How do I proceed?

Hi, you can definitely propose this as a project here:
https://publiclab.org/notes/warren/02-28-2017/call-for-proposals -- but I
think it's possible you may need to add some other tasks if this ends up
not taking a great deal of time?

Thanks!

On Fri, Mar 10, 2017 at 6:31 PM, Swapnil Gupta notifications@github.com
wrote:

@jywarren https://github.com/jywarren I have already contributed to
wiki pages and integrating the PublicLab Rich editor on plots2 and have
good experience with it. Can I take this up as my GSoC 2017 project?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/683#issuecomment-285813948,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ2RvN3Ufz7uGfT7A61MA3foEdDDsks5rkd1DgaJpZM4Jm4c7
.

@jywarren Okay I will start working on the proposal. Any suggestions on what other tasks I can add?

Perhaps some parts of the Geographic features -- there's a lot there and
perhaps even if you don't take on that whole project, you could coordinate
with another student to take on some of that, esp. that relates to user
profiles (since you'll be touching that system).

On Mon, Mar 13, 2017 at 7:00 PM, Swapnil Gupta notifications@github.com
wrote:

@jywarren https://github.com/jywarren Okay I will start working on the
proposal. Any suggestions on what other tasks I can add?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/683#issuecomment-286270230,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ6p4IOH6LDEH90pV6U9NKNMwuH3Xks5rlcqJgaJpZM4Jm4c7
.

@jywarren I would like to coordinate with @500swapnil on that project if its possible

@anyangocynthia we'd love to have your contributions -- and there is plenty of work to go around :-)

For those in this thread who haven't yet, please to take a look at our welcome page and perhaps give one of our help wanted issues a try as a first step. Thank you!

@jywarren Ok so I will add this feature and some of the features given in issue #1070 in my project proposal?

Hi, if anyone's still interested in this project, there are some nice next steps forward above (https://github.com/publiclab/plots2/issues/683#issuecomment-279818898) and we'd love some help! Thanks!

@jywarren I will like to contribute to this if no one is working on this.

oooh, this would be tremendous. But it's a big feature! I'm happy to help
support in any case. Thank you!

On Mon, Jan 8, 2018 at 4:30 PM, Sidharth Bansal notifications@github.com
wrote:

@jywarren https://github.com/jywarren I will like to contribute to this
if no one is working on this.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/683#issuecomment-356102534,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ7dM52jEeuG2j7a1UhlVY17kc7xjks5tIojigaJpZM4Jm4c7
.

I have started to learn apis and how to use them.
Also, I am nowadays trying to use omniauth at my application 'Event Manager' to do facebook logins etc.
Thanks, @jywarren for your support you help a lot!!!

you too!

On Mon, Jan 8, 2018 at 4:52 PM, Sidharth Bansal notifications@github.com
wrote:

I have started to learn apis and how to use them.
Also, I am nowadays trying to use omniauth at my application 'Event
Manager' to do facebook logins etc.
Thanks, @jywarren https://github.com/jywarren for your support you help
a lot!!!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/683#issuecomment-356108318,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJwlEprTFYjHfFzoG8ls_RFGtslHnks5tIo44gaJpZM4Jm4c7
.

How are things going? Is it proving to be a tough one? Happy to help!

@jywarren I would like to contribute to this.
Have some sort of implementation regarding this.

Oh, you have some code already? Interesting! Well, if @SidharthBansal is ok with it, I guess you can -- let's hear from @SidharthBansal first though. Thanks!

and thanks!

I was thinking we can have facebook, twitter, google, and Github. I guess there would be a large population who will be using GitHub at public lab. But I am not sure.
Also, the other thing is... at last after socialization through facebook, twitter, google, and Github, we need to have the integration of these into one single account. By this I mean, even if I am logging into via any of my accounts I should be able to access my same profile. As a user who is using fb, twitter, google and Github very frequently, I may not remember the last time through which account I have logged in.
Regarding the tweet and the like button which we have on the articles, we need to connect to the related accounts otherwise a user needs to first authorize public lab to like or tweet, in order to increase the number of people using Public Labs.
One other small thing related to socialization, which I noticed at public lab is, a user has two options to like --
1) Through the like fb button that would give him a like on the fb account on the bottom of the research note
2) Button on the top of the research note
If I have liked a post through fb, then it should get added in the users liked pages but it is not... May be we have different purposes of both buttons, but a user will bother to like once a page not twice. So, I think that also needs to be addressed. Also,then at /wikis/likes we need to change the stuff.

@ViditChitkara what do you suggest?

Hi, I wanted to cite this post I wrote yesterday to encourage you to think about this in separate independent parts: https://publiclab.org/notes/warren/01-18-2018/software-outreach-modularity-is-great-for-collaboration

I believe the easiest and most important initial step is to use the OmniAuth library (https://github.com/omniauth/omniauth) to do a Facebook login (with the omniauth-facebook library mentioned above), which can be done as a stand-along project.

Then we can repeat many of those steps for Twitter, then others. (these could be separate, follow-up projects), and think about how multiple OAuth logins could intersect.

Finally, I love the idea of broader integration between. We definitely would like peoples responses to a question on Twitter, for example, to be somehow shown on PublicLab.org. But I'd caution that this is in addition to, and much later than, the original project outlined above.

Thanks everybody!!! Let's start with step 1! 🎉

(edited the top of the issue to narrow things a bit, i hope that's helpful!)

Yeah fb login can be the first step, actually I read the post after writing the answer to you on this. I am happy to help at step 1.

@jwarren we need to have a developers account for the facebook login. So that only the developers can access that account. For that shall I create a fake account at developers.facebook or you will??

@jwarren I have started working on the project, I am currently working with the user_sessions_controller once I will be manage to add the new user login there I will make a pr. Also, the integration of the users with the facebook login has to be made in that step so I think the facebook login cannot be subdivided.
I was thinking of the final login system with all oath as we have on codechef.com
Or we can have a javascript pop up for the users login. What do you suggest?

@SidharthBansal you can make dummy applications on Facebook, GitHub, Google, Twitter, etc to make and test the feature. Make the codebase read the credentials (clientId, apiKey, accessToken etc) from environment variable.

Later on, once this is deployed on production, official apps will be made and the environment variables will be set on production accordingly.

TL;DR: The application for your development environment will be completely separate from the one we would be using in production for obvious reasons.

I am extremely sorry that I did not look at the conversations in the issue. Hence I created a pull request. @SidharthBansal you might have a look at the PR #2129. I would also like to help in contributing to the project( if required )!!!

@biswesh456 We'd love to have you contributing to the project. Let's use this issue to span out the entire plan and break it into smaller, self-contained tasks that multiple people could preferably look into in parallel.

That's all right -- @SidharthBansal can you open a PR even if you have just started, and then perhaps @biswesh456 can use that as a basis for work on an additional service -- or can help you make progress on the started PR? Let's break this up and work together, folks! I'm so glad you're all interested. We really badly need this feature! :-)

👍

@biswesh456 no problem at all, we can work on two different logins I have started on the fb. You may start with the twitter or google. One by one. I am glad to see your PR.
We are working in collaboration, so it is great idea to divide things and do them together. :smile:
I saw your pr @biswesh456, please try to break it into parts that will help a lot
@jywarren I have opened the pr

@jywarren I was writing my GSoC proposal these days and my project was social media integration of which the oauth login is a part along with other features like Twitter replies n all. But I see work has started on this already. Is there anyway I can help with this now and then continue on this as my GSoC project? I could perhaps help with Google login?

@500swapnil the way things have been progressing, and keeping in mind how this is a priority feature at the moment, I personally think it's very likely that this would be wrapped up before the summer begins, but if something is left by then, you should feel free to make a proposal regarding that.

@SidharthBansal Have you started with the Google Omniauth login? I would like to help with that!

Actually I was busy with solving the other issues on public lab and other college work. So, was unable to complete Facebook login. @jywarren may I write the oauth login as my Gsoc proposal??? @500swapnil the google github twitter login has to be made in consideration to the Facebook code. There are many places where otherwise redundant code will be present.

@jywarren also it will be a big project.
Can you tell where is the wiki page to enlist the proposal?? Last time, I remember you reviewed the proposals before submission to google.

I'd like to help out in this for GSOC, have prior experience in Oauth and it's testing.

Hi, all -- I echo @ryzokuken's optimism that we could get an initial implementation -- like just Facebook -- done before the summer. But expanding this to other platforms, including other integrations like the ability to draw in content from another platform to post in PL.org or the reverse, and many other things, could easily be part of a SoC proposal. I'd love to see the core functionality completed sooner than that, though, if we are lucky! :-)

Moved to #2388

Was this page helpful?
0 / 5 - 0 ratings