Select Page

It only took a few days for someone to step up to claim my bounty for fixing the WP Social Login Steemconnect integration. For some reason it seems the addresses changed for how it could interact with SteemConnect so things stopped working properly. Fortunately @chansetheguy stepped up to find the solution for WordPress users everywhere!

It turns out the recent merge for SteemConnect wasn’t everything that WP Social Login needed changed. Instead the plugin was still communicating with the wrong subdomain for the SteemConnect service. What chanse pointed out was that the following code needed to replace the former lines:

		// Provider api end-points
		$this->api->api_base_url  = "https://steemconnect.com/api/";
		$this->api->authorize_url = "https://v2.steemconnect.com/oauth2/authorize";
		$this->api->token_url     = "https://steemconnect.com/api/oauth2/token";

After a quick download from Github I gave the plugin a spin and it did indeed work! The site properly transferred off to SteemConnect, auth the keys and sends the user back to your WordPress redirect. Perfection!

How can I take this for a spin?

First you’re going to need an installation of WordPress to install it on to. You can find many sites that will host a WordPress install but my personal favorite one-click installation is Vultr. Vultr has a current promotion where if you sign up and deposit $10 then you’ll get a $10 credit as well. Not a bad way to test this out for a few months since you can get by with a $5/month WordPress blog account.

After you’re all set and ready to go then you’ll want to head over to the project Github and download a copy of the plugin. I’ve not placed a PR to @guix77’s original project but you can find a working copy here:

https://github.com/patrickulrich/wordpress-social-login/tree/steemconnect

After that you’ll need to create a Steem OAuth app if you haven’t already. This is a pretty simple process and just requires a Steem account to manage the sign in. Once you have an account you’d like to use just head over to the link below and sign in with the new account’s keys to change profile type to app.

https://app.steemconnect.com/sign/profile-update?type=app

Now that you’re new account is set to be an app you need to define your apps settings. This is handled through SteemConnect as well so it won’t be hard to complete. Just head over to https://app.steemconnect.com/apps/@youraccount/edit and fill out the spaces on it. [Note: Replace “@youraccount” with the name of your new Steem app account!]

This is the most technical part of the setup. You’ll need to install Node.js to be able to create a hash of a secret key for your app. Once you have Node installed you’ll want to create a new .json file called GENKEY.js. In this .json file paste the following code:

const crypto = require('crypto');

const secret = 'YOURSECRETKEY';
const secretHash = crypto.createHash('sha256').update(secret).digest('hex');

console.log('Secret hash', secretHash);

Now replace ‘YOURSECRETKEY’ with what you want your apps new secret signing key to be. Save the file and open a command prompt to the folder you saved your .json file in and run “node GENKEY.js” in your command prompt. This will output a hash of your secret signing key.

Now that you have your hash of the apps’ signing key it’s time to save that to the Steem blockchain. Using https://app.steemconnect.com/sign/profile-update?account=youraccount&secret=hashofyoursecretkey you’ll replace ‘youraccount’ with the app account’s name and ‘hashofyoursecretkey’ with hash we just made from running GENKEY.

Now you’re all set to boot up! Head into your WordPress plugin manager and install the plugin that you downloaded above. Head into Settings > WP Social Login and find the Steem logo on the right hand side of sites. This will add a new set of authorization to the bottom of the page. Fill in your user ID plus the ‘YOURSECRETKEY’ that your ran through GENKEY to create the hash and you’ll be all set.

It was that simple!

Big Thanks!

I need to give a huge thank you to a lot of people for making this happen! First and foremost thank you to @guix77 for the initial project and @chansetheguy for bringing me the code needed to update. While the bounty was up I had a number of great Steemians check in and see what they thought might be causing issues. Each of your contributions helped put the pie together so thank you to each one of you that contributed an idea towards this.

Finally thank you to @qwoyn & @steempytutorials for creating guides that made this possible for me. Steempytutorials has an excellent guide for setting up this plugin. While qwoyn can be credited for creating a SteemConnect app guide that most of the above writing is based off of. This was a tremendous help in getting me setup and I thank you for the effort you put in!