OAuth2 for GitHub
Project description
这是基于 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- 前缀
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file picbed_oauth2_github-0.2.0.tar.gz.
File metadata
- Download URL: picbed_oauth2_github-0.2.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27dc23bfd8a85eac548bef7ee2114d882f948d3efd5db3e70162a8f2aa75b47b
|
|
| MD5 |
789c45acd8f6c5fd52df4bb8f0190132
|
|
| BLAKE2b-256 |
7e6683541199ca3279c2a3167612fb66d85d632a06847b6b27cf3dcd6b07211e
|
File details
Details for the file picbed_oauth2_github-0.2.0-py3-none-any.whl.
File metadata
- Download URL: picbed_oauth2_github-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b082b26fd36b43ee8d752274b06c333d99a6f27df0ec99c6c6959edf289cabe
|
|
| MD5 |
4f4ea7a468ed14f6983714092ae4b8bc
|
|
| BLAKE2b-256 |
3ab68b2a2d7cf91471c5d16cd03303f112ea17ef2f99842412684d6b01fa38c7
|