Rabid Logo

Rabid is now Ackama

In September 2018, on the company’s 8th birthday, Rabid became Ackama - this was to reflect that fact that we work on large digital ecosystems, and given that nature is the largest ecosystem in the world we wanted a name that came from nature. Ackama, or Makamaka, is a small bushy tree with white flowers and red seeds. It’s found on the coast from Whangarei north.

Go to the Ackama blog

Open Source is Powerful: A Walkthrough Extending Loomio with a Custom OAuth2 Provider

One of the great superpowers of using open source in your company is that, if you’re using software in your business, you have the power to change it yourself, without having to ask anyone for permission. Another is that, if your contribution is useful, you can contribute your changes back to the community - making the software more useful for everyone.

In this post, I’ll briefly be going over the process of extending the popular open source project Loomio to integrate with an existing Drupal solution.

Collabforge were keen to use Loomio but having a single login was a key requirement to get started. They asked Rabid to assist with a feature on the Loomio.

Our task

Our task was a relatively simple one - add support for a custom OAuth2 provider, based off an existing Drupal server, as a Single Sign On (SSO) provider for the Loomio project. If possible, we also needed to hide the other authentication options - password, Facebook, Twitter etc - so that users of our custom Loomio would not be confused with login options that wouldn’t work.

Logging into Loomio using Drupal OAuth2

Making the change

If the open source project you are using is hosted by GitHub, GitHub provides excellent tools and interfaces for extending and contributing to open source, and making the experience more accessible and social.

The first step was to fork the Loomio project into your own repository or organisation - this is your own private copy, and you can do anything to it. In my case, I forked loomio/loomio into soundasleep/loomio.

Then the hard work of actually implementing the change began. In our case, I implemented our own custom OAuth2 strategy within the existing Omniauth library. Open source helped me develop this strategy, as I was able to use the wide range of existing strategies as reference solutions to the problem.

Contributing back to the community

Earlier, we had contributed a smaller bug fix to the project, which was accepted almost immediately - which showed that the maintainers of the project were available, willing and eager to review and accept contributions.

After our implementation was completed, it was clear to see that this solution might help others using the Loomio project - especially those that don’t want to use any of the other OAuth2 providers. This would also mean we wouldn’t have to maintain our own fork of the project - a daunting and time-consuming task. We therefore set about to contributing our changes back into the community.

Once our OAuth2 changes had been deployed onto a test server, and we verified it was working as expected, we can contribute these same changes back into the Loomio project. This involves making a pull request.

The maintaners and project team behind Loomio were willing to provide feedback almost instantly, allowing us to develop the best solution together as a team.

Thanks to Collabforge for engaging us to make a small contribution to the open-source project.

Jevon Wright