PHPackages                             busyphp/oauth - 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. busyphp/oauth

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

busyphp/oauth
=============

用于BusyPHP进行OAuth2.0三方登录的基本组件，支持目前主流的三方登录

v3.0.1(2y ago)1582Apache-2.0PHPPHP &gt;=8.0.0

Since Oct 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/busyphp/oauth)[ Packagist](https://packagist.org/packages/busyphp/oauth)[ Docs](http://www.harter.cn/?form=BusyPHP&plugin=busyphp/oauth)[ RSS](/packages/busyphp-oauth/feed)WikiDiscussions 3.0 Synced 3w ago

READMEChangelog (9)Dependencies (2)Versions (11)Used By (2)

BusyPHP OAuth2.0 登录模块
=====================

[](#busyphp-oauth20-登录模块)

说明
--

[](#说明)

用于BusyPHP进行三方登录的基本组件

安装
--

[](#安装)

```
composer require busyphp/oauth

```

> 安装成功后在后台 &gt; 开发模式 &gt; 插件管理 进行数据表安装

> 通过后台 &gt; 系统 &gt; 系统管理 &gt; 系统设置 &gt; 三方登录 进行参数配置

配置 `config/oauth.php`
---------------------

[](#配置-configoauthphp)

```
return [
    // 登录驱动配置
    'drivers'  => [
        // '驱动别名' => [
        //     'type' => '驱动名称',
        // ]
    ]
];
```

接口说明
----

[](#接口说明)

### OAuth2.0接口类

[](#oauth20接口类)

三方登录接口需要继承该接口

> `BusyPHP\oauth\Driver`

### 模型接口

[](#模型接口)

用户模型需要集成该接口

> `BusyPHP\oauth\interfaces\OAuthUserModelInterface`

使用方法
----

[](#使用方法)

```
