PHPackages                             stanislav-web/phalcon-ulogin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. stanislav-web/phalcon-ulogin

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stanislav-web/phalcon-ulogin
============================

Phalcon ULogin. The authorization form uLogin through social networks

v1.0-stable(11y ago)51822GPL-3.0PHPPHP &gt;=5.4.0

Since Dec 26Pushed 11y ago4 watchersCompare

[ Source](https://github.com/stanislav-web/phalcon-ulogin)[ Packagist](https://packagist.org/packages/stanislav-web/phalcon-ulogin)[ Docs](https://github.com/stanislav-web/phalcon-ulogin)[ RSS](/packages/stanislav-web-phalcon-ulogin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Phalcon ULogin
==============

[](#phalcon-ulogin)

[![Build Status](https://camo.githubusercontent.com/f1b94ef9a9436507d29c40fd05f7ddd1bddd33f94b1bb9b5e8b1fb8a68294cb3/68747470733a2f2f7472617669732d63692e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2e737667)](https://travis-ci.org/stanislav-web/phalcon-ulogin) [![Code Coverage](https://camo.githubusercontent.com/1e861c403d7efb90c6fca2047a6259f681303a63d1d303f3726432362e172ef1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stanislav-web/phalcon-ulogin/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/d6761063eaafbc7a3e9fca786fa51023ea18e816f63686b46aab72754bf1a0ce/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/stanislav-web/phalcon-ulogin/?branch=master) [![Total Downloads](https://camo.githubusercontent.com/a16a9234973e6c81c2be31e03aa193d3322ce1cc54e2c65cf0c5aabb00a070f3/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/stanislav-web/phalcon-ulogin) [![License](https://camo.githubusercontent.com/6ae3595c27c17c40a342895a1c8803aa8ff69509b84e1d035ca41879a970e601/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2f6c6963656e73652e737667)](https://packagist.org/packages/stanislav-web/phalcon-ulogin) [![Latest Stable Version](https://camo.githubusercontent.com/fe7acc6f80ba66be07626385d5641901fc6e7994fc9a5f849023551263c665cc/68747470733a2f2f706f7365722e707567782e6f72672f7374616e69736c61762d7765622f7068616c636f6e2d756c6f67696e2f762f737461626c652e737667)](https://packagist.org/packages/stanislav-web/phalcon-ulogin)

Phalcon ULogin. The authorization form uLogin through social networks

[![ULogin](https://camo.githubusercontent.com/3766512bdfcd6598500c276230627aeac6bc55d1b78c39ec4d7f3e4047807853/68747470733a2f2f756c6f67696e2e72752f696d672f66656174312e706e67)](https://ulogin.ru)

Compatible
----------

[](#compatible)

- PSR-0, PSR-1, PSR-2, PSR-4 Standards

System requirements
-------------------

[](#system-requirements)

- PHP 5.4.x &gt;
- Phalcon extension 1.3.x
- \\Phalcon\\Session in DI

Install
-------

[](#install)

First update your dependencies through composer. Add to your composer.json:

```
"require": {
    "stanislav-web/phalcon-ulogin": "1.0-stable"
}
```

```
php composer.phar install
```

OR

```
php composer.phar require stanislav-web/phalcon-ulogin dev-master
```

*(Do not forget to include the composer autoloader)*

Or manual require in your loader service

```
    $loader->registerNamespaces([
        'ULogin\Auth' => 'path to src'
    ]);
```

You can create an injectable service

```
    $this->di['ulogin'] = function() {
        return new ULogin\Auth();
    };
```

Usage
-----

[](#usage)

#### simple use (get socials as default)

[](#simple-use-get-socials-as-default)

```
    use ULogin\Auth;

    echo (new Auth())->getForm();
```

#### setup social widget

[](#setup-social-widget)

```
    echo (new Auth())->setType('window')->getForm(); // window, panel, small as default
```

#### setup providers for widget form

[](#setup-providers-for-widget-form)

```
echo (new Auth())->setProviders([
                   'vkontakte'     =>  true,   // show inline
                   'odnoklassniki' =>  true,   // show inline
                   'facebook'      =>  false,  // show in drop down
                   'google'        =>  false,  // show in drop down
                   'yandex'        =>  true,   // show inline
    ])->setType('panel')->getForm();
```

#### or setup providers as string

[](#or-setup-providers-as-string)

```
    echo (new Auth())->setProviders('vkontakte=true,odnoklassniki=true,facebook=false,google=false,yandex=true')->setType('panel')->getForm();
```

#### setup redirect url (current path using as default)

[](#setup-redirect-url-current-path-using-as-default)

```
    echo (new Auth())->setType('panel')->setUrl('?success')->getForm();
```

#### setup user fields getting from auth (optionals fields setup similary. Use setOptional())

[](#setup-user-fields-getting-from-auth-optionals-fields-setup-similary-use-setoptional)

```
    echo (new Auth())->setFields([
                   'first_name',
                   'last_name',
                   'photo',
                   'city'
              ])->getForm();
```

#### or setup fields as string

[](#or-setup-fields-as-string)

```
    echo (new Auth())->setFields('first_name,last_name,photo,city')->getForm();
```

#### alternate configuration

[](#alternate-configuration)

```
    $ulogin = new Auth(array(
            'fields'        =>  'first_name,last_name,photo,city',
            'providers'     =>  'vk=true,mailru=false,linkedin=false',
            'url'           =>  '/auth/?success',
            'type'          =>  'window'
        ));
    echo $ulogin->getForm();
```

#### get auth data

[](#get-auth-data)

```
    $ulogin = new Auth();

    // print form
    echo $ulogin->setUrl('?success')->getForm();

    // handler

    $request = new \Phalcon\Http\Request();
    if($request->hasQuery('success') === true) {

        // check authorization
        if($ulogin->isAuthorised()) {

            // get auth token
            echo $ulogin->getToken();

            // get  auth user data
            var_dump($ulogin->getUser());

            // logout
            $ulogin->logout();
        }
    }
```

Unit Test
---------

[](#unit-test)

Also available in /phpunit directory. Run command to start

```
php build/phpunit.phar --configuration phpunit.xml.dist --coverage-text
```

Read logs from phpunit/log

\##[Issues](https://github.com/stanislav-web/phalcon-ulogin/issues "Issues")

Screen
------

[](#screen)

[![ULogin](https://camo.githubusercontent.com/a88d5528787fde0ae7193a4ad415d1fefb0386d2d60addddc69f71c458a7e9e3/687474703a2f2f646c322e6a6f78692e6e65742f64726976652f303030342f303231312f3332333739352f3134313232362f333164623161393536362e6a7067)](https://ulogin.ru)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

4151d ago

PHP version history (2 changes)v1.0-betaPHP &gt;=5.3

v1.0-stablePHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4e51c2294dda0762398bb53f1ec5525fc38b08a6eb03f149448b5eea501d0fd?d=identicon)[stanislav-web](/maintainers/stanislav-web)

---

Top Contributors

[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (4 commits)")

---

Tags

authorizationsocialphalconuloginphalcon uloginphalcon ulogin widget

### Embed Badge

![Health badge](/badges/stanislav-web-phalcon-ulogin/health.svg)

```
[![Health](https://phpackages.com/badges/stanislav-web-phalcon-ulogin/health.svg)](https://phpackages.com/packages/stanislav-web-phalcon-ulogin)
```

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M247](/packages/league-oauth2-server)[hybridauth/hybridauth

PHP Social Authentication Library

3.4k8.5M93](/packages/hybridauth-hybridauth)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[auth0/auth0-php

PHP SDK for Auth0 Authentication and Management APIs.

40820.2M67](/packages/auth0-auth0-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
