Skip to main content

这是基于 sapic 的一个小的扩展模块, 用来接入 GitHub OAuth2 登录。

安装

  • 正式版本

    $ pip install -U picbed-oauth2-github

  • 开发版本

    $ pip install -U git+https://github.com/sapicd/oauth2-github.git@master

开始使用

此扩展请在部署 sapic 图床后使用,需要 其管理员进行添加扩展、设置钩子等操作。

添加:

请在 站点管理-钩子扩展 中点击安装第三方包,可在弹窗列表中选择 oauth2-github,点击行尾图标,或者在弹窗底部按照正式/开发版本填写安装。

安装完成后,在 站点管理-钩子扩展 中点击添加第三方钩子, 输入名称: oauth2gh ,确认后提交即可加载这个模块。

配置:

站点管理-网站设置 底部的钩子配置区域配置GitHub OAuth ID和 GitHub OAuth Secret!

使用:

1、在GitHub中 注册一个OAuth App

Authorization callback URL是sapic地址,比如http://demo.sapicd.com

其他参数根据实际填写。

提交后生成的 Client ID 和 Client Secret 是需要配置到 sapic 中的。

2、在sapic 站点管理-网站设置 底部钩子配置区域中选择第三方认证为 oauth2gh 即可。

启用后,在登录页面会显示使用 GitHub 登录,跳转到授权页,授权后跳回 sapic。

PS:

  • 登录状态是依靠session

  • 用户名有 gh- 前缀

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

picbed_oauth2_github-0.3.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picbed_oauth2_github-0.3.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file picbed_oauth2_github-0.3.0.tar.gz.

File metadata

  • Download URL: picbed_oauth2_github-0.3.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.9

File hashes

Hashes for picbed_oauth2_github-0.3.0.tar.gz
Algorithm Hash digest
SHA256 093f771c8fd65d38bd8bc0a60603883c3163ba7804d47546339f6eade7d95efb
MD5 3bd9767a897367a8430a85ae0bf83e6d
BLAKE2b-256 4d75b5ddfd862be0aed96ecfa4b0dca4e39d027492cb57cb22742d31438ae9ce

See more details on using hashes here.

File details

Details for the file picbed_oauth2_github-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for picbed_oauth2_github-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6061cf79b9360b300ac073db91426d7ddaa36eb41bf55a8fa191a85f766f7a45
MD5 2dd078607a90945f41b0cf98b82f3234
BLAKE2b-256 b46fede6dc60911f39a4ceb02a5d4b0faf35b5d4683f683bea822f411c1478f2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page