-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Reputation Oracle] hCaptcha token validation moved to the HCaptchaGuard
#2999
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
HCaptchaGuard
HCaptchaGuard
…ler to maintain the correct order of guards (`HCaptchaGuard` before `JwtAuthGuard`)
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
HCaptchaGuard
to remove code duplications and simplify services logic.How has this been tested?
Release plan
HUMAN_APP_EMAIL
in the environment.Potential risks; What to monitor; Rollback plan
N/A
Please, do not merge until this PR is merged.