百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Y

yii-eauth

> 编程语言
开源

EAuth扩展允许通过OpenID,OAuth 1.0和OAuth 2.0供应商认证用户.

324 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

EAuth扩展允许通过OpenID,OAuth 1.0和OAuth 2.0供应商认证用户.

Yii EAuth extension

EAuth extension allows to authenticate users with accounts on other websites. Supported protocols: OpenID, OAuth 1.0 and OAuth 2.0.

EAuth is a extension for provide a unified (does not depend on the selected service) method to authenticate the user. So, the extension itself does not perform login, does not register the user and does not bind the user accounts from different providers.

  • Demo
  • Demo project
  • Installation
  • Version for yii2

Why own extension and not a third-party service?

The implementation of the authorization on your own server has several advantages:

  • Full control over the process: what will be written in the authorization window, what data we get, etc.
  • Ability to change the appearance of the widget.
  • When logging via OAuth is possible to invoke methods on API.
  • Fewer dependencies on third-party services - more reliable application.

The extension allows you to:

  • Ignore the nuances of authorization through the different types of services, use the class based adapters for each service.
  • Get a unique user ID that can be used to register user in your application.
  • Extend the standard authorization classes to obtain additional data about the user.
  • Work with the API of social networks by extending the authorization classes.
  • Set up a list of supported services, customize the appearance of the widget, use the popup window without closing your application.

Extension includes:

  • The component that contains utility functions.
  • A widget that displays a list of services in the form of icons and allowing authorization in the popup window.
  • Base classes to create your own services.
  • Ready for authenticate via Google, Twitter, Facebook and other providers.

Included services:

  • OpenID:
    • Yahoo
    • Steam
    • Wargaming
  • OAuth1:
    • Twitter
    • LinkedIn
  • OAuth2:
    • Google
    • Facebook
    • Live
    • GitHub
    • Yandex (ru)
    • VKontake (ru)
    • Mail.ru (ru)
    • Odnoklassniki (ru)
    • Moi Krug(ru)
    • Dropbox
    • EVE Online

Resources

  • Yii EAuth
  • Demo
  • Demo project
  • Yii Framework
  • OpenID
  • OAuth
  • OAuth 2.0
  • loid extension
  • EOAuth extension

Requirements

  • Yii 1.1 or above
  • PHP curl extension
  • loid extension
  • EOAuth extension

Installation

  • Install loid and EOAuth extensions
  • Extract the release file under protected/extensions
  • In your protected/config/main.php, add the following:
…

Usage

Demo project

The source code of the demo is available here.

Basic setup

The action

…

The view

php
user->hasFlash('error')) {
		echo '
';
	}
?>
...

Do you already have an account on one of these sites? Click the logo to log in with it here:

widget('ext.eauth.EAuthWidget', array('action' => 'site/login'));
?>

Getting more user data (optional)

To receive all the necessary data to your application, you can override the base class of any provider. Base classes are stored in protected/extensions/eauth/services/. Examples of extended classes can be found in protected/extensions/eauth/custom_services/.

After overriding the base class, you need to modify your configuration file to set new name of the class. Also you may need to override the EAuthUserIdentity class to store additional data.

Translations (optional)

  • Copy the file /protected/extensions/eauth/messages/[lang]/eauth.php to /protected/messages/[lang]/eauth.php to translate the EAuth extension into other languages.
  • To add a new language, you can use the blank file /protected/extensions/eauth/messages/blank/eauth.php.

License

Some time ago I developed this extension for LiStick.ru and I still support the extension.

The extension was released under the New BSD License, so you'll find the latest version on GitHub.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言