This bundle is rewrited Zim32LoginzaBundle. https://github.com/zim32/Loginza-for-Symfony-2
-
install - standart by composer
"ivan1986/loginza-bundle": "dev-master",
new Ivan1986\LoginzaBundle\Ivan1986LoginzaBundle(),
-
Configure /app/config/security.yml
providers: loginza: id:
firewalls: : pattern: ^/ loginza: provider: loginza check_path: <>
-
Create form for loginza whis token_url={{check_path|url_encode}}
{% extends "::base.html.twig" %}
{% block body %} <script src="//loginza.ru/js/widget.js" type="text/javascript"></script> Please login {% endblock %}
-
Create user provider - it must implements LoginzaUserProviderInterface ( extends LoginzaUserProvider for example) and implements
public function loadUserByIdentityAndProvider($identity, $provider, $loginza_info)
User has ROLE_LOGINZA_USER role after authentication