So, another quick one.

I had the need to test something out in Known around OAuth2 “sign in as” buttons, so I put together a very quick, and generic, client for it.

This is very early days and was really written to implement an MVP proof of concept thingy for a client of mine. However, it could be more widely useful and with a bit of work could be handy for folk.

Installation

  • Check it out
  • Run composer install to get the various libraries
  • Put it in your IdnoPlugins directory as OAuth2Client
  • Activate in your plugins

Usage

Go to the admin page and create your new buttons by filling in the appropriate details.

Out of the box this plugin WON’T fully log you in as whatever, you need to write your own handler plugin to listen to the oauth2/authorised event hook.

This hook is passed an array containing the access token and other details for your to use to match up with a user, or create a new one.

If the hook goes unanswered, the plugin will look for id or username in the return JSON.

» Visit the project on Github...

Just another quick update…

In an ongoing effort to make use of the Known API easier and more flexible, the latest version available in GitHub, or via my unofficial packages, now has built in support for OAuth2.

OAuth2 server functionality is provided by an updated version of my OAuth2 Server code, which I’ve written a bit about before.

Going forward, I’m hoping to build out an easier way for third party clients to be able to connect, paving the way for a possible mobile client.

Anyway, go grab the latest version and have a play!