[Reputation Oracle] hCaptcha token validation moved to the HCaptchaGuard#2999
[Reputation Oracle] hCaptcha token validation moved to the HCaptchaGuard#2999
HCaptchaGuard#2999Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
HCaptchaGuardHCaptchaGuard
…ler to maintain the correct order of guards (`HCaptchaGuard` before `JwtAuthGuard`)
dnechay
left a comment
There was a problem hiding this comment.
LGTM, left some suggestions
After moving captcha verification logic to its own guard we can clearly see that e.g. SignInDto is not proper type of AuthService.signIn because it contains excessive information like captcha token. Ideally, DTO should be used when transferring data (e.g. for request and response bodies and proper conversion should be done in place) and services should have their own types, but it's a separate topic, not related to this PR
packages/apps/reputation-oracle/server/src/common/config/auth-config.service.ts
Show resolved
Hide resolved
packages/apps/reputation-oracle/server/src/modules/user/user.service.ts
Outdated
Show resolved
Hide resolved
packages/apps/reputation-oracle/server/src/common/guards/hcaptcha.ts
Outdated
Show resolved
Hide resolved
Agree with that but let it be a part of another refactoring phase. |
Issue tracking
To close #2995
Context behind the change
hCaptcha token validation moved to the
HCaptchaGuardto remove code duplications and simplify services logic.How has this been tested?
Release plan
HUMAN_APP_EMAILin the environment.Potential risks; What to monitor; Rollback plan
N/A
Please, do not merge until this PR is merged.