Closed josedacosta closed 9 years ago
The required Silex version is indicated in the installation section: "silex/silex": "~1.0",
@josedacosta There is a fork of this library which is meant to be compatible with Silex 2.x, https://github.com/atphp/silex-oauth
I have tried this fork but it does not appear to work with Silex 2.x. The reason it does not work is because:
The documentation says that the OAuthServiceProvider should be registered before the SecurityServiceProvider for obvious reasons, as the oauth authentication listener needs to be registered. However, the OAuthServiceProvider makes use of the $app['security'] context which will not exist until the SecurityServiceProvider has been registered.
I have not yet found a way around this problem, maybe the original author of this library may have some suggestions.
The constructor signature has actually changed for Silex 2.x, you now have to pass in $app['security.token_storage']
instead of $app['security']
. That was the missing part of the puzzle.
I've created a 2.0.x
branch (aliased to dev-master
or 2.0@dev
) which works with Silex 2.x and Pimple 3.0. Let me know if it works for you.
Thanks @gigablah, I'll give it a try!
hello, your demo is not compatible Silex 2.x, it would be good to mention it in the readme.txt, or do the updates, thank you
Silex 1.x use Silex\ServiceProviderInterface; Silex 2.x use Pimple\ServiceProviderInterface;