I want to write a login feature via social networks.
if the user is not logged it persists it into the database, if the user exists, log the user in.
What should I write into my provider?
Docs state :
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.
So this is what I wrote and then got stuck
<?php
namespace ng\MyBundle\Controller\Listeners;
use HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface;
class OAuthUserProvider implements OAuthAwareUserProviderInterface
{
}
Can you tell me what are the methods That I should use ?
Can anybody give me a provider example not using FOSuserBundle ?
Thanks