Add user social binding and unbinding (#919)

* Add user social binding and unbinding

* Add oauth2 state to binding

* Update oauth2 state

* Fix imports

* Update some interface definitions

* Update the authorization type security
This commit is contained in:
Wu Clan
2025-11-15 17:03:30 +08:00
committed by GitHub
parent 3b24dca935
commit 425bc202c2
13 changed files with 339 additions and 82 deletions
+4 -1
View File
@@ -231,10 +231,13 @@ class Settings(BaseSettings):
OAUTH2_LINUX_DO_CLIENT_SECRET: str
# 基础配置
OAUTH2_STATE_REDIS_PREFIX: str = 'fba:oauth2:state'
OAUTH2_STATE_EXPIRE_SECONDS: int = 60 * 3 # 3 分钟
OAUTH2_GITHUB_REDIRECT_URI: str = 'http://127.0.0.1:8000/api/v1/oauth2/github/callback'
OAUTH2_GOOGLE_REDIRECT_URI: str = 'http://127.0.0.1:8000/api/v1/oauth2/google/callback'
OAUTH2_LINUX_DO_REDIRECT_URI: str = 'http://127.0.0.1:8000/api/v1/oauth2/linux-do/callback'
OAUTH2_FRONTEND_REDIRECT_URI: str = 'http://localhost:5173/oauth2/callback'
OAUTH2_FRONTEND_LOGIN_REDIRECT_URI: str = 'http://localhost:5173/oauth2/callback'
OAUTH2_FRONTEND_BINDING_REDIRECT_URI: str = 'http://localhost:5173/profile'
##################################################
# [ Plugin ] email