Skip to content

去除冗余的接口和实现,保留五个模块Service的实现 - #88

Merged
fj-sunny merged 21 commits into
1024XEngineer:mainfrom
fj-sunny:codex/aliyun-auth-integration
Aug 14, 2026
Merged

去除冗余的接口和实现,保留五个模块Service的实现#88
fj-sunny merged 21 commits into
1024XEngineer:mainfrom
fj-sunny:codex/aliyun-auth-integration

Conversation

@fj-sunny

Copy link
Copy Markdown
Contributor

Closes #87

本 PR 提交当前 fork 中的完整代码,并关联 Issue #87

内容包括:

  • 阿里云 SMTP 邮箱验证码发送适配
  • 阿里云 CAPTCHA 2.0 服务端校验适配
  • Web 端阿里云 CAPTCHA 弹窗配置
  • 本地运行时凭据仅通过环境变量注入,不写入代码或配置文件

验证:本地后端和 Web 已启动,真实验证码请求会进入阿里云校验链路;未提供有效阿里云验证码参数时会返回 HUMAN_VERIFICATION_REQUIRED。

@fj-sunny fj-sunny changed the title 接入阿里云邮箱验证码与人机验证 去除冗余的接口和实现,保留五个模块Service的实现 Aug 13, 2026

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two release-impacting issues in the locked PR range. Focused backend auth tests pass (17 tests), and the Web auth contract suite passes (17 tests).


@PostMapping("/challenges")
public ApiResponse<ChallengeResponse> issueChallenge(@Valid @RequestBody EmailRequest request) {
var challenge = emailAuthService.issueMobileChallenge(request.email());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This native challenge endpoint calls issueMobileChallenge without any human-verification token, while the same service only enforces CAPTCHA in issueChallenge (the web path). Because /api/auth/mobile/email/challenges is publicly permitted, any client can automate requests for arbitrary addresses and trigger unlimited SMTP sends (and associated provider cost/abuse). Please require and verify the CAPTCHA token here as well, or add an equivalent server-side rate limit before issuing the challenge.

ON session_message (session_id, message_no)
WHERE audio_url IS NOT NULL;

-- Final schema additions formerly delivered by V2 and V9-V15.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new auth tables/columns are appended to V1__baseline.sql, but existing deployments that have already applied V1 will not re-run this file under Flyway. As a result, upgrading an existing database leaves app_users, auth_email_challenges, user_sessions, and the related schema changes absent, causing the new auth endpoints to fail at runtime. Please add a new migration (V16+ per the repository convention) instead of modifying the applied V1 baseline.

@fj-sunny
fj-sunny requested a review from pionxe August 13, 2026 10:11
@fj-sunny
fj-sunny requested a review from yydounai1234 August 14, 2026 00:28
@pionxe

pionxe commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

ok

@pionxe pionxe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@fj-sunny
fj-sunny merged commit 6fdc54c into 1024XEngineer:main Aug 14, 2026
12 checks passed
@fj-sunny
fj-sunny deleted the codex/aliyun-auth-integration branch August 14, 2026 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

去除冗余的接口和实现,保留五个模块Service的实现

2 participants