feat(auth): add wechat miniapp customer phone login
Implement Wechat Mini Program phone number login flow for end customers: - add PhoneLoginIn Pydantic request schema - create wechat.py module for Wechat API interactions and phone code exchange - add customer JWT utilities and require_customer authentication dependency - add new public API endpoints: /api/public/auth/phone-login and /api/public/auth/me - add required environment config variables and update example .env - add comprehensive test cases for the new auth flow and endpoints
This commit is contained in:
@@ -15,6 +15,9 @@ class Settings(BaseSettings):
|
||||
oss_access_key_secret: str | None = Field(default=None)
|
||||
oss_endpoint: str | None = Field(default=None)
|
||||
oss_bucket_name: str | None = Field(default=None)
|
||||
wechat_miniapp_appid: str | None = Field(default=None)
|
||||
wechat_miniapp_secret: str | None = Field(default=None)
|
||||
customer_jwt_expires_hours: int = Field(default=720)
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user