Drupal 8

Do you want Steem users to login to your Drupal, Wordpress or other PHP site? Yes, it's now possible for Steem users to use their Steem identity in order to log in to your Drupal, Wordpress or other PHP website. Before I tell you the story of the development of those 3 projects, let's have a look at some pictures... or just test the login using the Social Auth Login above and click the Steem logo !

Drupal Social Auth

This is the Social Auth module for Drupal, which allows users to log in with third-party identity providers like GitHub, LinkedIn, Twitter, ... and of course Steemconnect !

Now what is Steemconnect ?

Steemconnect

SteemConnect by @busy.org is a identity layer built on top of the Steem blockchain, that allows you to connect to authorized apps is a secure and convenient way. They have been working with Steemit so apps can interact with Steem users without getting their sensible information (like secret key & password). Basically, if an app uses Steemconnect, it only has access to what the user allows.

Social Auth Steemconnect connected

And now, back to Drupal. You just logged to the Drupal site, and the module created a new user for you with your information fetched from your Steem account. You can interact with website as if you had created a classic account.

Wordpress

I'm a Drupal developer, and I also have a lot of love for Wordpress. So I figured: why not developing the same functionnality for Wordpress? After some research, I found the excellent Wordpress Social Login plugin and decided to go with it.

Steemconnect

Same thing there, you are redirect to Steemconnect. If you accept to grant the "Login" right to the application, then you will go back again the Wordpress site.

Development

Now, the story behind those 3 projects, and some technical details including some issues to discuss!

I've been just recently involved in blockchain technology. I developed a Drupal 7 suite of Ethereum modules (not yet released, more will come about this in another post, maybe). Thing is, I got captivated by blockchain (and I admit the cryptocurrency financial boom has a lot to do with my interest, too).

Then I discovered Steemit, and in fact I discovered it through Utopian.io. What an awesome project to reward awesome writers with crypto! And opensource contributors too! So, my first search was of course "Drupal". I saw @gokulnk's article in which he was running a gig to develop a Drupal module with Steemconnect.

The rest is history, and lots, lots of hours and evenings spent developing late. Aaaaannnnnd.... Some delicate negociation, explanation, and all, with my girlfriend :) Indeed, I wanted to rush those developments and be the first!

@gokulnk's research was right, Social Auth module was the way to go. I quickly realised there was no PHP library to leverage Steemconnect, like there are for most providers. I didn't notice first that Social Auth 8.x-2.x used mainly the excellent PHPLeague oAuth2 client. So I started developing with another library, not mainstream. I quickly came back naturally to oauth2-client and developed a provider for Steemconnect.

oauth2-steemconnect

It was at the point when it was working that I got a very nice surprise, and realised that most of recent releases of Drupal Social Auth providers used oauth2-client. So it was really easy to develop https://www.drupal.org/project/social_auth_steemconnect.

One thing is yeat to discuss: Steemconnect does NOT provide the user email. I can understand why, we are in crypto space. But I really needed an email to develop the Drupal and Wordpress modules. So I added a fake user email built like this : guix77@fake-steemconnect-email.com. This is something that has to be discussed. Your toughts (and PRs !!!) on this topic are welcome on GitHub

Then I developed the Drupal module and submitted an issue on Drupal.org, in order to push the code to the still empty module - and win Gokul NK's contest :)

Drupal issue

Last task was to develop a Wordpress plugin. It was quite difficult to find a correct code base, not too specific and offering flexibility with providers. But I finally came upon Wordpress Social Login, which is a really niceproject. Ironically, if I wanted to make a PR and hope it will be accepted, I could not really use my brand new oauth2-steemconnect. So I started again to have fun with Steemconnect API. But it was quick and I really loved the simplicity and power of Wordpress Social Login. Ah, yes, Drupal developers CAN love Wordpress, and even ADORE it, sometimes :)

Wordpress PR

Now, here I am, writing this article, then I will prepare my Drupal and Wordpress sites to host the demos. At this time, you should be able to check them out :

The future?

Obviously, there are many interesting to do with Drupal, Wordpress and Steemit and the Steem blockchain. I will take a well-earned rest and then will probably code something else. Which functionnalities would you like to see with Drupal / Wordpress / Steem? Just let me know below, and who knows!

Thanks for reading!

Commentaires

I have downloaded and installed WordPress Social Login, but did not see the option of steemconnect, how do you achieve the function?

En réponse à par jason (non vérifié)

It's because it's not yet integrated into the official Wordpress Social Login. I have asked to include it but there are no news so far. If you want it now, you can download the branch "steemconnect" of my fork of the project : https://github.com/guix77/wordpress-social-login

Ajouter un commentaire