1 Star 0 Fork 0

Halo SIGs / plugin-oauth2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.22 KB
一键复制 编辑 原始数据 按行查看 历史

plugin-oauth-github

Halo 2.0 的 GitHub 第三方登录插件。

开发环境

插件开发的详细文档请查阅:https://docs.halo.run/developer-guide/plugin/hello-world

git clone git@github.com:halo-sigs/plugin-starter.git

# 或者当你 fork 之后

git clone git@github.com:{your_github_id}/plugin-starter.git
cd path/to/plugin-starter
# macOS / Linux
./gradlew pnpmInstall

# Windows
./gradlew.bat pnpmInstall
# macOS / Linux
./gradlew build

# Windows
./gradlew.bat build

修改 Halo 配置文件:

halo:
  plugin:
    runtime-mode: development
    fixedPluginPath:
      - "/path/to/plugin-starter"

如何使用

  1. 安装此插件
  2. 前往 GitHub 创建 OAuth App ,填写相关 信息,并将 Authorization callback URL 的值填写为 https://{your-domain}/login/oauth2/code/github。 如果是本地测试填写为 http://127.0.0.1/login/oauth2/code/github ,不能是 localhost ,参考: authorizing-oauth-apps
  3. 填写 Client ID 和 Client Secret
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/halo-sigs/plugin-oauth2.git
git@gitee.com:halo-sigs/plugin-oauth2.git
halo-sigs
plugin-oauth2
plugin-oauth2
feature/oauth-github

搜索帮助

344bd9b3 5694891 D2dac590 5694891