xervice/github-oauth

3.0.0 2018-08-27 09:33 UTC

This package is auto-updated.

Last update: 2024-09-29 05:09:21 UTC


README

安装

composer require xervice/github-oath

配置

  • 您必须将控制器添加到您的路由中
  • 您必须将 GithubLogin 类添加到 UserDependencyProvider::getLoginPluginList 中
$this->addRoute(GithubAuthConfig::LOGIN_PATH, GithubController::class, 'githubLoginAction', ['GET']);
$this->addRoute(GithubAuthConfig::AUTH_PATH, GithubController::class, 'githubAuthAction', ['GET']);
$this->addRoute(GithubAuthConfig::ERROR_PATH, GithubController::class, 'githubError', ['GET']);

protected function addRoute(string $path, string $controller, string $action, array $methods);

使用

您必须将 GithubController 添加到您的路由中。建议的路径已在 GithubAuthConfig 中配置。