-
Notifications
You must be signed in to change notification settings - Fork 3
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
Score image captcha #1611
base: staging
Are you sure you want to change the base?
Score image captcha #1611
Conversation
…nts. Add to score when user access policy set.
packages/procaptcha-frictionless/src/ProcaptchaFrictionless.tsx
Outdated
Show resolved
Hide resolved
packages/provider/src/api/captcha.ts
Outdated
if (sessionId) { | ||
const sessionRecord = await tasks.db.checkAndRemoveSession(sessionId); | ||
if ( | ||
!sessionRecord || |
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.
clearer if this is a helper func (i.e. the comment isn't required if this is a call to the helper func isValidImgSession() or something)
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.
Created a base captchamanager class and a helper function called getFrictionlessTokenIdFromSession
that's shared between image and frictionless managers.
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.
Added env logger to all managers
packages/provider/src/api/captcha.ts
Outdated
); | ||
} else if ( | ||
!( | ||
clientSettings?.settings?.captchaType === CaptchaType.image || |
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.
helper func with nice name > long if block
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.
Same helper now shared by image and pow
packages/provider/src/api/verify.ts
Outdated
[ApiParams.verified]: approved, | ||
status: req.t(verified ? "API.USER_VERIFIED" : "API.USER_NOT_VERIFIED"), | ||
[ApiParams.verified]: verified, | ||
...(score && |
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.
const nicelyNamedCanClientSeeAScoreHelperFunc = () =>
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.
Added to base CaptchaManager
lScore
, old timestamp, user access policy encounteredScreencast.from.2025-01-19.22-53-27.mp4
TODO