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
How to use user entity provider #1961
Comments
I agree. I am struggling to find documentation on how to actually do that. Seems like fosuserbundle is really not needed anymore. |
Actually, i implemented that, but there's only basic testing on my side for now. Entity
And original User entity with some extra fields
Seems to be working for now. Will see once things start expiring :) Please don't consider that production code. I am not sure what I am really doing. |
As pointed in #1964, the documentation could do better job, there is an entity provider already, you can setup it like: services:
hwi_oauth.user.provider.entity:
class: HWI\Bundle\OAuthBundle\Security\Core\User\EntityUserProvider
arguments:
$class: App\Entity\User
$properties:
'facebook': 'facebook'
'google': 'google' # security.yaml
security:
firewalls:
main:
# ...
oauth:
#...
oauth_user_provider:
service: hwi_oauth.user.provider.entity |
Actual Behavior
What is the actual behavior?
The bundle needs a service that is able to load users based on the user response of the oauth endpoint. If you have a custom service it should implement the interface: HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface.
could you provide more documentation about this: A) Have a user provider that implements OAuthAwareUserProviderInterface
or examples,
Expected Behavior
What is the behavior you expect?
Steps to Reproduce
What are the steps to reproduce this bug? Please add code examples,
screenshots or links to GitHub repositories that reproduce the problem.
Possible Solutions
If you have already ideas how to solve the issue, add them here.
(remove this section if not needed)
The text was updated successfully, but these errors were encountered: