-
Notifications
You must be signed in to change notification settings - Fork 43
[Reputation Oracle] hCaptcha token validation moved to the HCaptchaGuard
#2999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.