Closed jenssegers closed 6 years ago
Can you split it into logical commits please. It is really confusing what is a style and what is actually a change.
Sorry, the main thing that has changed is this:
- public function createStorageInstance($storageName)
+ public function createStorageInstance()
{
- $storageClass = "\\OAuth\\Common\\Storage\\$storageName";
- $storage = new $storageClass();
+ // get the laravel session instance and wrap it into a storage instance
+ $session = App::make('session')->driver();
+ $storage = new SymfonySession($session);
So smooth :clap:. I wish this thing would be solved already. @artdarek Reveal thyself!
I ended up creating my own package: https://github.com/jenssegers/laravel-oauth
But I figured I should contribute something here :)
I modified the code to share the Laravel session instance with the consumer instances. I also added a unit test and modified the formatting slightly to be more in line with Laravel.