-
Notifications
You must be signed in to change notification settings - Fork 136
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
Impossible to configure custom User Repository in 7.0.0-BETA1 #256
Comments
Hi @pkivits-litebit 👋 Thanks for your report. Good catch, we should be expecting an |
@pkivits-litebit Merged! If you want to update off |
I am attempting to use a custom repository as well, however even with the change to the contract interface I still run into problems. The thing is that later on in the flow, for example in the laravel-auth0/src/Auth/Guard.php Line 246 in 3edee55
However, that method does not exist on the Illuminate Authenticatable contract, although it does exist on Auth0\Laravel\Contract\Model\User . So it seems the Repository contract should specify that interface instead?
|
And thinking it through... my User model should implement the |
Hey @JanMisker 👋 Thanks for your thoughtful feedback! That could be worth considering, let me investigate and get back to you. (I'm on vacation for the next week or so, so apologies in advance if I am delayed in any responses.) |
Hey there 👋 Revisiting this topic, I've iterated on the user provider API to ease use of custom user models. The PR implementing these changes is #264 and will be released as Beta 2 this week for feedback. |
Delighted to hear it, @affektde 👍 If you see any room for improvement we can iterate on with this side of things before the full release, don't hesitate to let me know |
SDK Version
Other (specify in 'additional context')
PHP Version
PHP 8.0
Composer Version
2.x
What happened?
Expected:
Custom user repository configured in config/auth.php to be used by Auth0\Laravel\Auth\User\Provider.
Actual:
How can we reproduce this issue?
In the config/auth.php setup a custom user repository instead of the one provided by auth0/laravel-auth0.
Additional context
Because the $repository parameter in Auth0\Laravel\Auth\User\Provider is expecting a Auth0\Laravel\Auth\User\Repository type, it is impossible to pass any other type then Auth0\Laravel\Auth\User\Repository to Auth0\Laravel\Auth\User\Provider.
Thus making it impossible to configure a custom User Repository.
The text was updated successfully, but these errors were encountered: