2017 © Pedro Peláez
 

yii2-extension yii2-ulogin

Extension for yii2 ulogin integration

image

rmrevin/yii2-ulogin

Extension for yii2 ulogin integration

  • Wednesday, June 20, 2018
  • by rmrevin
  • Repository
  • 1 Watchers
  • 14 Stars
  • 3,099 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 12 Versions
  • 3 % Grown

The README.md

ULogin integration for Yii 2

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

composer require "rmrevin/yii2-ulogin:~1.4"

or add, (*3)

"rmrevin/yii2-ulogin": "~1.4",

to the require section of your composer.json file., (*4)

Usage

use rmrevin\yii\ulogin\ULogin;

echo ULogin::widget([
    // widget look'n'feel
    'display' => ULogin::D_PANEL,

    // required fields
    'fields' => [ULogin::F_FIRST_NAME, ULogin::F_LAST_NAME, ULogin::F_EMAIL, ULogin::F_PHONE, ULogin::F_CITY, ULogin::F_COUNTRY, ULogin::F_PHOTO_BIG],

    // optional fields
    'optional' => [ULogin::F_BDATE],

    // login providers
    'providers' => [ULogin::P_VKONTAKTE, ULogin::P_FACEBOOK, ULogin::P_TWITTER, ULogin::P_GOOGLE],

    // login providers that are shown when user clicks on additonal providers button
    'hidden' => [],

    // where to should ULogin redirect users after successful login
    'redirectUri' => ['sign/ulogin'],

    // force use https in redirect uri
    'forceRedirectUrlScheme' => 'https',

    // optional params (can be ommited)
    // force widget language (autodetect by default)
    'language' => ULogin::L_RU,

    // providers sorting ('relevant' by default)
    'sortProviders' => ULogin::S_RELEVANT,

    // verify users' email (disabled by default)
    'verifyEmail' => '0',

    // mobile buttons style (enabled by default)
    'mobileButtons' => '1',
]);

Getting user info after success auth (response from ulogin):, (*5)

use rmrevin\yii\ulogin\AuthAction;

class SiteController extends Controller
{

    public function action()
    {
        return [
            // ...
            'ulogin-auth' => [
                'class' => AuthAction::className(),
                'successCallback' => [$this, 'uloginSuccessCallback'],
                'errorCallback' => function($data){
                    \Yii::error($data['error']);
                },
            ]
        ];
    }

    public function uloginSuccessCallback($attributes)
    {
        print_r($attributes);
    }
}

The Versions

20/06 2018

dev-master

9999999-dev

Extension for yii2 ulogin integration

  Sources   Download

MIT

The Requires

 

authorization oauth yii2 ulogin

20/06 2018

1.4.0

1.4.0.0

Extension for yii2 ulogin integration

  Sources   Download

MIT

The Requires

 

authorization oauth yii2 ulogin

16/11 2015

1.3.1

1.3.1.0

Extension for yii2 ulogin integration

  Sources   Download

MIT

The Requires

 

authorization oauth yii2 ulogin

16/11 2015

1.3.0

1.3.0.0

Extension for yii2 ulogin integration

  Sources   Download

MIT

The Requires

 

authorization oauth yii2 ulogin

10/03 2015

1.2.1

1.2.1.0

Extension for yii2 ulogin integration

  Sources   Download

MIT

The Requires

 

authorization oauth yii2 ulogin

09/09 2014

1.2.0

1.2.0.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

04/04 2014

1.1.2

1.1.2.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

04/04 2014

1.1.1

1.1.1.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

27/02 2014

1.1.0

1.1.0.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

20/08 2013

1.0.3

1.0.3.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

09/08 2013

1.0.1

1.0.1.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin

09/08 2013

1.0.0

1.0.0.0

Extension for yii2 ulogin integration

  Sources   Download

BSD-3-Clause

The Requires

 

authorization oauth yii2 ulogin