Skip to content
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

dont assume an eloquent model #8

Open
corbosman opened this issue Nov 2, 2018 · 1 comment
Open

dont assume an eloquent model #8

corbosman opened this issue Nov 2, 2018 · 1 comment

Comments

@corbosman
Copy link

Hey, ive been looking at your package and I think you should consider changing the code to allow any kind of UserProvider. Right now you are newing up a model through the config file, but imo it would be better to do something like this:

$user = auth()->getProvider()->retrieveById($token->getClaim('sub'));

That way, any kind of userprovider would work, it doesn't depend on there being a findOrFail on the user model.

@rokde
Copy link
Member

rokde commented Nov 4, 2018

Maybe we should refactor this part. Do you have a pull request or do you wanna wait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants