15

I am using OpenID Selector module to integrate OpenID logins to my website; the same service used by Stackoverflow for login/registration. However, how can I add an option to "Add more logins" like Stackoverflow? I am open to suggestions also.

The idea is to prevent duplicate users. I am using D7.

See attached image.

Also kind of tweaks are welcome. enter image description here

  • 2
    If there is no working modules, i am open to suggestions, and if i get a perfect logic; i pledge you will get a D7 module hosted in drupal.org for sure. – niksmac Jun 20 '12 at 7:14
  • Complete one day of inactivity, i am disappointed. Its a rare thing in Stackoverflow. !! – niksmac Jun 21 '12 at 10:33
  • I know there is Janrain module that integrates multiple login, but I have no idea how or even if they deal with duplicates at all. – stefgosselin Jun 26 '12 at 19:19
  • @NikhilM are you putting a sandbox project for this or what? I'll be happy to review it :-) – AjitS Nov 22 '12 at 6:02
  • @indrock, Unfortunately my client dropped the concept. I am planning to make something similar but not recently. I am pretty busy. – niksmac Nov 22 '12 at 6:54
9
+25

So the default assumption most Drupal modules make with authentication is that they will replace the current login setup with their own.

This approach is described well in http://drupal.org/node/114774#dist-auth and can be seen in how the current openid module provided in Drupal core works.

If I understand your question correctly you want to provide a way for people to authenticate from multiple different sources and have those enabled sources show up under their user profile. I don't think there is a module that does this yet, as most of the auth modules operate in their own little bubble as described above.

After a quick look at OpenID Selector you aren't going to get a lot of mileage from there, its mainly implementing and configuring the jquery library. You are going to need to write this from scratch.

The main pieces of your module will be:

  1. A database table that maintains the logins associated to a given user.
  2. Some kind of form_alter scheme for the login page to show all of the available login options the site owner has specified (this will replace what the individual modules currently do)
  3. An admin page for the site owner to select from available options.

Each one of those login options will probably be provided by a separate contrib module, so you might have to alter your logic for the specifics you find in the implementation from those modules.

To me its an ambitious undertaking for a configurable module that you plan to release, but if you go the quick and dirty highly customized / hard coded route for a single site it shouldn't take you too long.

Other places to look for inspiration on how auth modules operate in Drupal and possible sources you might want to include are FBOauth and Twitter.

  • Thanks for such a detailed answer. I need it anyway. So lets do it myself at least it will help me. – niksmac Jun 24 '12 at 4:39
8

Does the HybridAuth Social Sign-on not fit your requirements?

This module integrates HybridAuth library into Drupal and allows your users to login and register using Google, Facebook, Twitter, Yahoo, MySpace, Windows Live, LinkedIn, Foursquare, AOL, OpenID and more. Additional providers include: Github, Gowalla, LastFM, Vimeo, Disqus, Instagram, Viadeo, Identica, Tumblr, Goodreads, QQ, Sina, Murmur, Pixnet, Plurk, Skyrock, 500px, Vkontakte, Mail.ru, Yandex, Odnoklassniki.

I have not used it myself, but reading the description and screenshots seems to suggest it does what you need.

Update: Looking at the Usage statistics it seems like the module got picked up only recently and might not have been usable when you posted this question.

  • If this module works good... which seems to be the case... you save me about 20 or 40 hours of work jaja thanks! – Beto Aveiga Jun 4 '15 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.