I recently wrote a little app called wikicrowd (blog post to follow) using Laravel and MediaWiki / Wikimedia authentication. It certainly wasn’t entirely out of the box, and the existing docs still need some tweaking.
This post reflects the steps I went through to set this app up, and it should only take a few minutes.
You can find a tag of the code at the end of this walkthrough on Github for PHP 8. (There is also a tag for PHP 7.4)
Shout out to the developers that worked on the Wikidata Mismatch Finder which is also a Laravel app with MediaWiki OAuth and was used as inspiration when writing this post, along with the documentation for the package used by Taavi.
Setup Laravel
First off I need a Laravel installation. Currently 8.x is the stream of the latest versions, and the installation docs say to run the below command.
curl -s https://laravel.build/demo-laravel-mediawiki-auth | bashCode language: JavaScript (javascript)
I’m not a fan of running random code on the internet on my machine, but this is what the docs say. It creates a directory at the location you specify at the end of the URL, in my case demo-laravel-mediawiki-auth , creates a laravel/laravel project, and does a composer install.





