PHPackages                             krupni/yii-eoauth - 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. krupni/yii-eoauth

ActiveLibrary

krupni/yii-eoauth
=================

Yii Framework Extension. EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user. Based on Google's software.

1.0.0(7y ago)115.2k↓100%1MITPHP

Since May 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/krupni/yii-eoauth)[ Packagist](https://packagist.org/packages/krupni/yii-eoauth)[ Docs](http://www.yiiframework.com/extension/eoauth/)[ RSS](/packages/krupni-yii-eoauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

**This repository is restored itmages/yii-eoauth**

**Install package**

`composer require krupni/yii-eoauth`

Introduction
------------

[](#introduction)

EOAuthUserIdentity class implements IUserIdentity Yii interface and the OAuth protocol to authenticate a user.

Based on Google's software.

[![Flattr this git repo](https://camo.githubusercontent.com/7e3f46a36526479d701ef7f90a0f8c3ac2fbab3087446e2a9fceed75cd1ab802/687474703a2f2f6170692e666c617474722e636f6d2f627574746f6e2f666c617474722d62616467652d6c617267652e706e67)](https://flattr.com/submit/auto?user_id=jorgebg&url=https://github.com/jorgebg/yii-eoauth&title=yii-eoauth&language=en_GB&tags=github&category=software)

\###Resources

- [OAuth](http://oauth.net/)
- [InDaHouseRulez SL](http://www.indahouserulez.com)
- [Google API DFP PHP Example web application](http://code.google.com/p/google-api-dfp-php/source/browse/trunk#trunk/webapp/lib) This link is currently broken, [here is a working link](https://code.google.com/p/oauth/source/browse/code/php/OAuth.php)

\##Documentation

\###Requirements

- Yii 1.0 or above

\###Installation

- Extract the release file under `protected/extensions/eoauth`

\###Usage

Use this sample actions for login/logout with Google:

```
    public function actionLogin() {

        Yii::import('ext.eoauth.*');

        $ui = new EOAuthUserIdentity(
                array(
                	//Set the "scope" to the service you want to use
                        'scope'=>'https://sandbox.google.com/apis/ads/publisher/',
                        'provider'=>array(
                                'request'=>'https://www.google.com/accounts/OAuthGetRequestToken',
                                'authorize'=>'https://www.google.com/accounts/OAuthAuthorizeToken',
                                'access'=>'https://www.google.com/accounts/OAuthGetAccessToken',
                        )
                )
        );

        if ($ui->authenticate()) {
            $user=Yii::app()->user;
            $user->login($ui);
            $this->redirect($user->returnUrl);
        }
        else throw new CHttpException(401, $ui->error);

    }

    public function actionLogout() {

        Yii::app()->user->logout();

        // Redirect to application home page.
        $this->redirect(Yii::app()->homeUrl);
    }
```

Set to load the extensions in the main.php (by [DavidHHuan](http://www.yiiframework.com/user/2371/), thanx!)

```
'import'=>array(
    'application.models.*',
    'application.components.*',
        'ext.eoauth.*',
        'ext.eoauth.lib.*',
),
```

License
-------

[](#license)

Some time ago I developed this extension for [InDaHouseRulez SL](http://www.indahouserulez.com). I no longer work there, but I still support the extension.

The extension was released under the [MIT license](http://www.opensource.org/licenses/mit-license.php), so I made a fork on [GitHub](https://github.com), where you'll find the latest version:

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

2908d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c053b96c1f13674492a4a3d25fc5e430d4ecd696fcd5765e6df363f9c8806143?d=identicon)[krupni](/maintainers/krupni)

---

Top Contributors

[![krupni](https://avatars.githubusercontent.com/u/2693259?v=4)](https://github.com/krupni "krupni (5 commits)")

### Embed Badge

![Health badge](/badges/krupni-yii-eoauth/health.svg)

```
[![Health](https://phpackages.com/badges/krupni-yii-eoauth/health.svg)](https://phpackages.com/packages/krupni-yii-eoauth)
```

PHPackages © 2026

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