Closed syphernl closed 9 years ago
Hey, I suspect the issue is probably that you have the config file in the wrong place, the location changed from 4 to 5.
Instead of app/config/packages/adamwathan/eloquent-oauth/config.php
, the config now just lives in config/eloquent-oauth.php
. Lemme know if you already have it set up that way and it's still not working, happy to help figure it out.
Wow, that was fast :) Tricky thing is that we did not have any separate configuration for this package. It is all being dealt with by our wrapper.
A (somewhat) nasty workaround is to create the provider manually, instead of going trough registerProvider in boot() of our package:
$this->app['config']['eloquent-oauth.providers.customauth'] = $this->app['config']['customauth.providers.customauth'];
Hm so where do you keep your client_ids and client_secrets? There must be some config file? It sounds like you just won't be able to use the service provider and will have to configure the package dependencies in your own service provider.
We store our client_id, client_secret and additional information in our own configuration.
Ok, so definitely need your own service provider. I suspect you had your own service provider for the L4 version too, or you would've had the same issues I think.
I'd say try just completely copying the service provider and renaming it to CustomAuthServiceProvider
and sticking it in your Providers
namespace, and just modify any references to the default config and replace it with yours.
Hmm, that does mean that we might run into problems in case the original provider for this package has changes. Previously they would play nice together. We register our provider, which then registers this package's provider.
For now the config setting in boot()
seems to work, but previously there was no problem with it when there were no providers configured at all which is a bit odd.
Did you still have the app/config/packages/adamwathan/eloquent-oauth/config.php
file, just as an empty array maybe? That would probably also solve your issue.
I'm gonna look at updating the service provider to skip provider registration if there's no config file, :+1:
Pushed out a change that I expect will fix your issue, lemme know if it does :)
Appears to be working without me having to set the config via $this->app['config']['eloquent-oauth.providers.sentry']
:)
We have our own authentication package which is basically a wrapper around this package. This was done in order to make it easier to work with, since only our package (and config) needed to be there and it would supply the underlying eloquent-oauth with appropriate configurations. It also adds some additional routes, views (403 etc) and the related model. All in one package is very convenient.
With Laravel 4(.2) this was working just fine. However, with the
dev-laravel-5
version this doesn't work anymore :(In our serviceprovider we registered our provider as such:
This was working fine with L4. But with L5 this doesn't appear to be possible (anymore) since we're getting an exception stating:
This originates from
/vagrant/vendor/adamwathan/eloquent-oauth/src/EloquentOAuthServiceProvider.php
:Has anything changed in that regard?