In DrupalCon Prague social BoF the guys behind fluxkraft have introduced us to their module suite and distribution for automating social media workflows.
The core of fluxkraft is built on top of Guzzle a PHP HTTP client & framework for building RESTful web service clients that is now a part of Drupal 8 core.

The stand out features that impressed us were:

  • The module suite and its use and integration with rules was very impressive
  • it was intuitive to use providing a great interface based on rules
  • Specific implementations to social services (e.g. facebook and twitter) implemented as individual modules
    see https://drupal.org/project/fluxservice

Looking at how such modules and suites of modules can help to deliver the framework for the Drupal Social API / Initiative we pose the following questions:

  1. A Pure Drupal solution: Should the development of specific social services integration be handled by Drupal or are there other open source / non Drupal specific projects we should be using that may present a more generic [more widely adopted and supported?] and less Drupal centric/specific approach?
  2. Architecture: Is the architecture of fluxkraft the "correct one" i.e is right for all use cases?
  3. Standards or module suite: Should we attempting to envisage a component standards based architecture that doesn’t aim to be an all encompassing ‘framework’ but rather provides the ‘glue’ for modular components each providing specific and non-overlapping functionality?

A Pure Drupal solution

Since Munich we have also been made aware of HybridAuth. This is an open source project with a goal to act as an abstract api between your application and various social apis and identity providers such as Facebook, Google & Twitter.
This also has a Drupal module see https://drupal.org/project/hybridauth
There are others out there that try to do the same either as similar projects or commercial services.
So should we be trying to leverage HybridAuth or other solutions?

Architecture

We haven’t spent enough time looking at fluxkraft in detail to do it justice, so the questions are in no way a criticism.
It is worth looking at the stack of the solution and asking a few questions like what are the abstraction layers?
Does the API have a low level integration level that's not rule bound and a higher one for rules implementation?
If the core API was only built on top of guzzle and had good abstraction layers it may be more suitable to one day end up in core.
Is Hybridauth also attempting to be too all encompassing
Should our aim to be to work with projects such as Hybridauth / fluxcraft to evolve standards and more modular approaches and aim to select elements of both.

Standards or module suite

Since the aim of the Social Initiative isn’t to develop yet another ‘module’ but rather attempt to gather together the knowledge and participation of key players in the development of such modules, should we rather be looking at providing the standards and collaborative framework for the wider integration of such modular solutions?

Comments

iaugur’s picture

Issue summary: View changes
iaugur’s picture

Issue summary: View changes
guy_schneerson’s picture

Category: Task » Feature request
gvso’s picture

Title: Technology for Social API integration » OAuth integration for Social API
Version: » 8.x-1.x-dev
Category: Feature request » Plan
gvso’s picture

As of current, I think the best option is to implement the HybridAuth library as a dependency for most of the Social API sub-modules.

https://drupal.org/project/hybridauth only focuses on sign in users to a site; however, we'll need a common library/module that allows user authentication in a Drupal site and autoposting to social networking services.

dahacouk’s picture

Well, by default it looks like only HybridAuth is left! I wish people wouldn't start projects (Guzzle and Flux for instance) that they weren't committed to maintaining. Anyway...

gvso’s picture

gvso’s picture

Title: OAuth integration for Social API » Authentication technology integration for Social API

I would like to point out what @e0ipso told me

the base code should account for any possible authentication methods (OAuth, Hawk, JWT, etc.) so the authentication system cannot assume the implementor module for a specific network will use OAuth.

Meeting a common ground for most of the social networks will be a hard work of analysis and continuous refactoring, and even then not all networks' requirements can be fulfilled (some social networks may not even exist yet).

I changed the issue title as HybridAuth doesn't only make use of OAuth. For now, we can take advantage of that feature in HybridAuth, but how @e0ipso said, we cannot assume a that a service will use a specific authentication method.

There may also be cases in which HybridAuth doesn't implement a provider for a social networking service, although we can collaborate with the project to implement the provider we'll eventually need ;)

e0ipso’s picture

Additionally, another scenario that we may have not contemplated initially is that we will have different SDKs for many social networks. Those SDKs may have an easy way to do login.

gvso’s picture

Status: Active » Fixed

The project is using an architecture that allows implementers (sub-modules based on the Social API project) to use the library they want to implement (HybridAuth, provider PHP SDK, etc.). Therefore, I believe we can close this discussion as a decision has already been made

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.