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- 前缀

Metadata

Release files for picbed-oauth2-github 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for picbed-oauth2-github 0.3.0
File Size Uploaded
picbed_oauth2_github-0.3.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for picbed-oauth2-github 0.3.0
File Interpreter ABI Platform
picbed_oauth2_github-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / picbed_oauth2_github-0.3.0.tar.gz

Download URL picbed_oauth2_github-0.3.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
093f771c8fd65d38bd8bc0a60603883c3163ba7804d47546339f6eade7d95efb
BLAKE2b-256 checksum
How to use checksums
4d75b5ddfd862be0aed96ecfa4b0dca4e39d027492cb57cb22742d31438ae9ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / picbed_oauth2_github-0.3.0-py3-none-any.whl

Download URL picbed_oauth2_github-0.3.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6061cf79b9360b300ac073db91426d7ddaa36eb41bf55a8fa191a85f766f7a45
BLAKE2b-256 checksum
How to use checksums
b46fede6dc60911f39a4ceb02a5d4b0faf35b5d4683f683bea822f411c1478f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release 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