Hello,
I discovered flarum recently and decided to use it for our developer forum. One of the requirements was single-sign-on. I did some research and came upon the facebook auth extension (https://github.com/flarum/flarum-ext-auth-facebook). While the extension provided a good blueprint on what I needed to do, I discovered that injecting a custom middleware was the easier approach.
When a user visits our site, the user is required to authenticate via our corporate login. The user's information is stored inside of an encrypted cookie. We needed a custom middleware in flarum that would extract this information and authenticate the user. I am currently doing this by inserting a line of code into Forum/Server.php that pipes to my custom middleware.
Of course this is a terrible way since it is touching source. Is there a way to insert custom middleware via extensions? If not, are there future work in this area to allow custom middleware solutions?
Thanks