Files
digital-psychology/docs/BACKEND_DESIGN/BD-2026-049-wechat-auth-gateway.md
jackyu66gitandCursor 7155b8b53a feat(api): 接入微信登录并原生实现咨询域(ECR-049/050)
小程序可在 Go 上完成微信手机号登录、测评、预约和下单,不再反代 Java。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 00:26:29 +08:00

27 lines
789 B
Markdown

# Backend Design: ECR-049 WeChat Auth + Consult Gateway
| Field | Value |
|-------|-------|
| ID | BD-2026-049 |
| Status | **Approved** |
| Coding | **In progress** |
| Migration | `000058_wechat_auth_gateway` |
## Boundary
```text
POST /api/v1/auth/wechat
{ code, encryptedData, iv } → existing SessionResult
users.wx_openid UNIQUE · wx_unionid · java_platform_user_id
user_sessions.java_access_token
ANY /api/app-api/* → JAVA_BASE/app-api/* (Go Bearer → Java Bearer)
ANY /api/admin-api/* → JAVA_BASE/admin-api/*
Java POST /app-api/oauth/internal/issue-mini-app (X-Internal-Key)
Identity: wx_openid = t_platform_user_account.account (mini_app)
phone = t_platform_user.mobile
```
## Out
Module migrate · Java decommission · Admin auth · auto ECR-050