james david low

live / work / play / worship

3rd Party Authentication

3rd Party Authentication is a wordpress plugin that allows wordpress to authenticate against other authentication systems. These include:

  • Gmail / Google Apps
  • Any generic POP/IMAP email service
  • http://wordpress.org/extend/plugins/3rd-party-authentication/

    Known Issues
    There is a known issue related to the google login, sometimes it requires the user to enter a captcha (one of those pattern of fuzzy letters), especially if a user types the wrong password. At the moment the plugin doesn’t handle this, and may stop the user using this service. You can fix this by going here: https://www.google.com/accounts/DisplayUnlockCaptcha

    Change log
    0.2.2
    Added text on login page to indicated regular logins work
    0.2.1
    Bug fix for when using default port
    0.2.0
    Remove blank from the list in 0.1.7
    0.1.9
    Fix for if wp_authenticate already declared
    0.1.8
    Added google apps domains to the list
    0.1.7
    Shows a list of domains that can be logged in using
    0.1.6
    Can now auto create users


    If you found any of the software useful, please consider supporting its further developement by donating.

    11:58am / Nov 24th / 08
    « Sound Interfaces Post ToDo »

    43 Comments

      As far as I can read, your plugin seems to be the perfect match for my need. BUT do you know, if it works with WPMU 2.7? And if not, any ideas what is needed to get it to work?

      (I have some projects, where I can use this plugin, so if interested, I can test it on my WPMU installations and surely will donate you for the work!)

      7:00pm / Feb 20th / 09 henrik hammer

      I use it on some wordpress 2.7 blogs. But haven’t tested it on WPMU. I’ll quickly do a test and get back to you about it.

      10:42pm / Feb 20th / 09 James Low

      Hey,
      I’ve tried an initial version that should support WPMU. Give it a try here, and let me know if it works: http://downloads.wordpress.org/plugin/3rd-party-authentication.0.1.4.zip

      Also, in order to add logins with a @gmail.com address you’ll need to change the pregmatch in wp-includes/wpmu-functions.php on Line 897 (in wpmu 2.7) from:

      preg_match( “/[a-z0-9\]+/”, $user_name, $maybe );

      to:

      preg_match( “/[a-z0-9@\\.]+/”, $user_name, $maybe );

      1:26am / Feb 23rd / 09 James Low

      Cool - I will give it a try!

      THX a bunch!!

      3:43pm / Feb 23rd / 09 henrik hammer

      I just installed this into a fresh 2.7.1 installation and I’m not getting anything. I activated it, then went to the settings under 3rd Party Authentication (left all of that blank?). Is there something that I’m missing? My way of testing is just entering my email address (gmail) and password and it’s giving me a “invalid login” error. I did the clear captcha thing and I still got nothin’. New to Wordpress, but not to PHP and web development. Let me know. Thanks!

      –Andrew

      3:36am / Mar 11th / 09 Andrew Ariotti

      Hi,
      errorwindow after login with googlemail password: - “Username not an email address”

      any idea?

      10:46pm / Mar 15th / 09 netze

      The current version of the plugin requires that you login and that the facebook username is set to the full @gmail.com or @googlemail.com email address.

      11:58pm / Mar 15th / 09 James Low

      By “facebook username” I assume that you meant “Google username,” right? That makes more sense now.

      10:02am / Mar 16th / 09 Andrew Ariotti

      haha, yes sorry, too many other things going through my head :-P

      10:03am / Mar 16th / 09 James Low

      I understand. I’ve always got both Facebook and Google going through my mind and tend to get them mixed up.

      One last question just for clarification: by activating this plug-in my users that have an @gmail.com or @googlemail.com will be authenticating using their Google Password, right? All my other users will be treated normally, right?

      10:48am / Mar 17th / 09 Andrew Ariotti

      Yes, unless you click the disable regular users checkbox.

      10:54am / Mar 17th / 09 James Low

      I installed this on a new site i am setting up and receiving the following error when I try to activate:Fatal error: Cannot redeclare class HTTPRequest in /home/ninedrag/public_html/jiulongpai.com/wp-content/plugins/3rd-party-authentication/httplib.php on line 12

      Any ideas?

      12:06am / Mar 25th / 09 Matt Talbert

      I am not able to set this up with WordPress 2.7.1. Is it known to work with this version? If so, does it work with Google Apps for your Domain? Any help would be greatly appreciated.

      12:34pm / Jun 9th / 09 Brandon Martinez

      any chance you will publish an update that supports WordPress 2.8.4? I’ve installed the plug-in and tried using cybersnac@gmail.com (my gmail address) as the user name and it’s telling me the login is invalid

      3:38am / Sep 2nd / 09 CyberSNAC

      sorry to bother.. but plug-in has disabled “admin” user to authenticate… Please advise…

      6:40am / Sep 3rd / 09 dghant

      CyberSNAC
      You must set up users in wordpress to have the user name the same as your full email address. I’ll have a look at testing on 2.8.4 soon

      dghant
      use FTP or the file manager of your hosting to delete the plugin so that you can login again. I’ll try get a version up that permits the admin to authenticate normally

      7:44am / Sep 3rd / 09 James Low

      Thanks James,

      I have another question , of course.
      would you happen to have the
      DNS’s and port for authenticated
      against hotmail, AOL and yahoo’s IMAP ??

      So we can provide authentication there too???

      9:31pm / Sep 3rd / 09 dghant

      James,

      So I have to register a user account for a user with their full @gmail.com address as their username and match their password as well?

      I was thinking I could just have a user log in using their gmail.com credentials without having to have a user in place already.

      the way I understand you are telling me this works, I would have to get the users to register on the site using the same credentials set that they use for gmail, prior to them actually being able to log into my site with their gmail.com credentials.

      Is this correct? Thanks again :)

      11:18pm / Sep 3rd / 09 CyberSNAC

      CyberSNAC
      You have to have the user already added to your blog, this is because you might want certain permissions for a user (editor/admin) and not just subscriber. Once you’ve done that, it authenticates the password against google, so if the user changes their password on google they will automatically just use their new password on your wordpress blog.

      I see what you mean about not adding users though if you just want them to be able to comment. I can add this as an option, that they just get the subscriber role.

      11:28pm / Sep 3rd / 09 James Low

      dghant
      Yahoo Pop settings (Pop is a paid service accept for yahoo.co.uk)
      http://help.yahoo.com/l/us/yahoo/mail/original/mailplus/pop/pop-14.html

      Hotmail Pop (free for all)
      http://mailcall.spaces.live.com/blog/cns!CC9301187A51FE33!49799.entry

      AOL Pop/IMAP
      http://about.aol.com/faq/openmailaccess

      11:29pm / Sep 3rd / 09 James Low

      James,

      I think this plugin has alot of potential. I don’t like some of the other 3rd party plugins because they are too bulky. This one seems to be able to do it’s thing without having to add any major content to the login widget or page. I like streamlined.

      I’d like to see the plugin be able to register people using their google credentials with a default role of subscriber. I could then elevate their priveleges as I see fit. Can that be done?

      11:37pm / Sep 3rd / 09 CyberSNAC

      Can definitely be done. Just a question of time when I have other commitments.

      1:02am / Sep 8th / 09 James Low

      I hear ya! I’ll keep an eye out on the plugin upgrades page for when you get around to it.

      Thanks much :)

      8:30pm / Sep 8th / 09 CyberSNAC

      Added it!

      3:08pm / Oct 13th / 09 James Low

      James,

      When I tried installing the 3rd part authentication on my Wordpress 2.8.4, it was giving this error
      “Parse error: parse error, unexpected T_CLASS in /blog1/wp-content/plugins/3rd-party-authentication/3rd-party-authentication.php on line 14″
      Please help me on this.

      5:26pm / Oct 15th / 09 Vinayak K

      James,

      Can I use it for mail ids of Yahoo for login?

      Thanks

      5:31pm / Oct 15th / 09 Vinayak K

      Hi James,
      Getting a plugin activate error with 0.1.8:
      Cannot redeclare wp_authenticate() (previously declared in /blahblah/wp-includes/pluggable.php:456) in /blahblah/wp-content/plugins/3rd-party-authentication/3rd-party-authentication.php on line 511
      Seem to get this with new installation from 0.16 upwards, 0.1.5 seems fine.
      Any ideas?
      Thanks
      YikYak

      8:49pm / Oct 15th / 09 YikYak

      Vinayak K
      - Not sure why that error is happening, the code should be syntax correct. I can only suggest trying the latest version.
      - There are two ways you can use yahoo logins. If the user is a UK user or a premium user and has POP3 mail access you can add the email address to the POP3 server access details to the list at the bottom of the plugin settings.
      - The other way is that you can sign up as a google user with yahoo email addresses, and add yahoo.com to the list of domains to authenticate as google logins in the long text box.

      YikYak
      - New version should fix that. That function is only required if you want users to be able to login on the fly, without going through the normal registration process.

      12:06am / Oct 16th / 09 James Low

      0.1.9 :) activate error indeed fixed, thanks

      3:21am / Oct 16th / 09 YikYak

      Matt Talbert asked about authentication using Google Apps for Your Domain - is this possible?

      1:41am / Oct 30th / 09 Josh

      Yep its possible. Just add your google apps domain to the text box. You can also check the checkbox to remove the gmail.com and googlmail.com domains if required. Your usernames for wordpress need to be the full google apps emails.

      7:48am / Oct 30th / 09 James Low

      Hi James,

      I’ve just installed your plug in on 2.8.6 and get the following error when trying to activate:

      Parse error: parse error in C:\webroot\wp-content\plugins\3rd-party-authentication\3rd-party-authentication.php on line 14

      I’m a newbie to Wordpress but reasonable experience with PHP and cannot figure out what is causing this error. Any help would be great

      8:16am / Dec 3rd / 09 Matthew Stone

      I’ve not tried this plugin on windows, most people seem to use a linux distribution to run it. It could be that you’re using PHP 4 though?

      8:22am / Dec 3rd / 09 James Low

      Instead of PHP 5. I checked that line, I’m pretty sure its right and working on my websites.

      8:23am / Dec 3rd / 09 James Low

      Thanks James, I’m limited with my current hosting provider to PHP4 so I think its time I moved providers!

      8:01pm / Dec 3rd / 09 Matthew Stone

      James, I’ve just found this great plugin. I need to authenticate users against another -private- authn service which offers an easy REST API to do it. Looking at the googleclientlogin.php code I’m figuring whether your 3rd party plugin is strictly linked to those predefined Google and email services or it would be extensible enough to use other services, maybe writing a similar myprivateclientlogin.php module to do that.
      Thanks!

      2:54am / Dec 13th / 09 Nomikon

      Hi,
      While there is no plugin system in the current version, it is very easily extended to add other services. The current version also support authentication my POP3 or IMAP to non-google domains.

      Let me know if you need any help modifying it. If you look at the code, you’ll see there is an authentication class you can inherit from, and then just add suitable logic to authenticate your domain against that authenticator.

      8:13am / Dec 13th / 09 James Low

      Hi James,
      Great plugin, just what I needed for my students who all have GoogleApps accounts. I noticed though that if I turn off “regular logins” then I cannot get in as admin. I think even on one blog I activated the plugin, did not set 3rdpartyauthentication options and got a default setup that kept me out as admin. Do you think there is any merit in having an option (or a default) to treat the admin user separately?
      Thanks
      YikYak

      6:23am / Dec 18th / 09 YikYak

      Hmmm, I thought I had already had hard coded to include the admin user. I’ll check why its not working.

      10:26am / Dec 18th / 09 James Low

      Hmmm, worked for me. Is your admin user called ‘admin’ ?

      10:30am / Dec 18th / 09 James Low

      Hmm, tricky, yes my user is “admin”. I’ve definitely been locked out of a couple of my blogs, and end up having to delete the plugin, do a lost password recovery upload and reactivate your plugin.

      The error meesgae I get when it all goes wonky is something like “user name is not a valid email address” if that helps, although even when I delete your plugin, I still have to do lost password recovery as well…perhaps something else is going wrong?

      7:01am / Dec 20th / 09 YikYak

      I installed this on a new site i am receiving the following error when i try to login wiht a google apps account… Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.google.com:443 (Unable to find the socket transport “ssl” - did you forget to enable it when you configured PHP?) in /home3/mailjour/public_html/wp-content/plugins/3rd-party-authentication/httplib.php on line 111

      Warning: fwrite(): supplied argument is not a valid stream resource in /home3/mailjour/public_html/wp-content/plugins/3rd-party-authentication/httplib.php on line 112

      Warning: fclose(): supplied argument is not a valid stream resource in /home3/mailjour/public_html/wp-content/plugins/3rd-party-authentication/httplib.php on line 116

      2:17am / Mar 26th / 10 Xavier

      Hi James,

      Thanks for the gr8 plugin!

      After installing the plugin, the login window shows “login with your domain name address”

      Could you please advise on how to login with domain name to wordpress account.

      11:08am / Apr 17th / 10 Amit