WP-OAuth – Enhances Your WordPress Login and Registration

oauth-2-smWP-OAuth is a WordPress plugin that I developed which allows users to login or register by authenticating with an existing Google, Facebook, LinkedIn, Github, Reddit or Windows Live account via OAuth 2.0.

Install it from the Plugins page in your WordPress backend. Just search “WP-OAuth”.

More information and support available at the WordPress Plugins Directory, or you may contribute via the open-source Github development repository.


Tags: , , , ,


  1. Andrew Tinkler says:

    Hi Perry,
    I’m trialing the WP-Oauth (Beta) plugin. It’s a great piece of workand is working fine via the WordPress User Profile. However I can’t get the shortcode call to work from a Page. This problem is probably unrelated to WP-Oauth, as the [date] shortcode is also not working. However I just wanted to check that the correct code to insert on the Page is [wpoa_login_page]. Can you please confirm?


    • Hi Andrew, you’re the first person to provide feedback about the plugin so far. I appreciate it. The shortcode you want should be [wpoa_login_form]. Make sure you have version 0.1.1 which is when the shortcode was added.

    • Andrew, see my comment below, it’s a bug.

  2. Hello,
    I tried to use your plugin these days to use as a base for adding a new oauth provider.
    It works fine and I wanted to let you know you did a great job.
    As Andrew a few days ago, I still fail to use [wpoa_login_form] shortcode that doesn’t seem to work when used in any page or article.
    It may be my fault so I’m going to look deeper why.

    • Thanks a lot for the feedback. You and Andrew are correct, this is a bug in version 0.1.1. I’ll need to update the plugin and post a new version to the plugin directory.

      In the meantime if you want to fix this problem yourself it only takes 2 modifications to the wp-oauth.php file.

      First, change line 99 from this:

      add_shortcode('wpoa_login_form', 'wpoa_login_form');

      To this:

      add_shortcode('wpoa_login_form', array($this, 'wpoa_login_form'));

      Then change line 348 from this:

      $html = wpoa_login_form_content($a['layout']);

      To this:

      $html = $this->wpoa_login_form_content($a['layout']);

      Now you can call [wpoa_login_form] in one of these ways:

      [wpoa_login_form layout=”links-column”]
      [wpoa_login_form layout=”links-row”]
      [wpoa_login_form layout=”buttons-column”]
      [wpoa_login_form layout=”buttons-row”]

  3. Hey Perry. Cool plugin, and compared to others, it kinda works and I like it, BUT… when I tested the Facebook login, it crated me a userXYZ account (XYZ – a number) with absolutely no data taken from my Facebook account, although I approved the app (and it has the right to get my name and the email address).

    This would be a great functionality… Or maybe this was because I already was administrator with that email address? Than it made no sense to create a new user. Anyhow… Hope you’ll read this and might be able to help.

    Great work. Cheers!

  4. Hi,
    Great work on a nice, simple and fast plugin 🙂

    only problem is, I really need to be able to set the wp username and email address fields; I’ve tried editing your code to pick up the email address and assign it to $username; (aswell as adding that line after the username update check section) but it keeps breaking

    I’m only using Facebook login, which by default, provides email addresses; so i know for sure that the email address is available – all our users are logged in using their email address, and its causing some problems for us having “user10, user11, user12” etc

    if you could tell me what code I need to add into register.php to grab the email address from facebook, after a user clicks the Facebook login button, and set the username to the email address, that would be awesome 🙂

    (ideally something I can put after all the other username stuff, so that it over-rides the automatic username generation – that will do for now, eventually when i get it working with other providers like Google I’ll add an If statement to separate it out)

    many thanks


Leave a Reply

Your email address will not be published. Required fields are marked *