Go to file
2024-05-20 22:12:36 +08:00
aioauth_fastapi 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
alembic 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
html 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
pyromod 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
src Support openID AutoDiscovery URL 2024-05-20 22:12:36 +08:00
.env.example Support openID AutoDiscovery URL 2024-05-20 22:12:36 +08:00
.gitignore 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
alembic.ini 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
gen_keys.py 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
LICENSE Initial commit 2024-01-13 15:24:26 +08:00
main.py 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00
README.md Support openID AutoDiscovery URL 2024-05-20 22:12:36 +08:00
requirements.txt 🎉 Support oidc by telegram 2024-01-14 16:04:25 +08:00

Telegram OAuth

Configuration

CONN_URI=sqlite+aiosqlite:///data/db.sqlite3 # 数据库 uri
DEBUG=True # 调试模式
PROJECT_URL=http://127.0.0.1 # 项目可访问的地址
PROJECT_LOGIN_SUCCESS_URL=http://google.com # 默认登录成功后跳转的地址
PROJECT_HOST=127.0.0.1  # 项目监听的 ip 地址
PROJECT_PORT=80 # 项目运行的端口
JWT_PRIVATE_KEY='data/private_key' # jwt 私钥
JWT_PUBLIC_KEY='data/public_key' # jwt 公钥
BOT_TOKEN=xxx # 机器人 token
BOT_USERNAME=xxxxBot # 机器人用户名
BOT_API_ID=111 # api id
BOT_API_HASH=aaa # api hash
BOT_MANAGER_IDS=[111,222] # 管理员 id

OIDC Endpoints

Auth URL : /oauth2/authorize

Token URL : /oauth2/token

Cert URL : /oauth2/keys

OIDC Client

INSERT INTO "client" ("grant_types", "response_types", "redirect_uris", "id", "client_id", "client_secret", "scope") VALUES ('authorization_code', 'code', 'https://127.0.0.1/access/callback', 'UUID', '123456', '123456', 'openid profile email');