New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to register provider later / externally #43
Comments
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 |
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:
|
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 |
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 |
Did you still have the I'm gonna look at updating the service provider to skip provider registration if there's no config file, 👍 |
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 |
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?
The text was updated successfully, but these errors were encountered: