Skip to content

Commit c1dfbfd

Browse files
authored
fix(experience): captcha not show on indetifier singin form (#7359)
1 parent 71de5a1 commit c1dfbfd

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

.changeset/swift-glasses-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@logto/experience": patch
3+
---
4+
5+
add CAPTCHA box to identifier sign in form

packages/experience/src/components/IdentifierRegisterForm/use-register-with-username.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const useRegisterWithUsername = () => {
8282
handleError,
8383
usernameErrorHandlers,
8484
navigate,
85+
executeCaptcha,
8586
]
8687
);
8788

packages/experience/src/components/IdentifierSignInForm/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Button from '@/components/Button';
1010
import ErrorMessage from '@/components/ErrorMessage';
1111
import { SmartInputField } from '@/components/InputFields';
1212
import type { IdentifierInputValue } from '@/components/InputFields/SmartInputField';
13+
import CaptchaBox from '@/containers/CaptchaBox';
1314
import TermsAndPrivacyCheckbox from '@/containers/TermsAndPrivacyCheckbox';
1415
import usePrefilledIdentifier from '@/hooks/use-prefilled-identifier';
1516
import useSingleSignOnWatch from '@/hooks/use-single-sign-on-watch';
@@ -155,6 +156,7 @@ const IdentifierSignInForm = ({ className, autoFocus, signInMethods }: Props) =>
155156
)}
156157
/>
157158

159+
<CaptchaBox />
158160
<Button
159161
name="submit"
160162
title={showSingleSignOnForm ? 'action.single_sign_on' : 'action.sign_in'}

packages/experience/src/hooks/use-password-sign-in.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const usePasswordSignIn = () => {
6565
await redirectTo(result.redirectTo);
6666
}
6767
},
68-
[asyncSignIn, checkSingleSignOn, errorHandlers, handleError, redirectTo]
68+
[asyncSignIn, checkSingleSignOn, errorHandlers, handleError, redirectTo, executeCaptcha]
6969
);
7070

7171
return {

packages/experience/src/hooks/use-send-verification-code.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,15 @@ const useSendVerificationCode = (flow: UserFlow, replaceCurrentPage?: boolean) =
8282
);
8383
}
8484
},
85-
[asyncSendVerificationCode, flow, handleError, navigate, replaceCurrentPage, setVerificationId]
85+
[
86+
asyncSendVerificationCode,
87+
flow,
88+
handleError,
89+
navigate,
90+
replaceCurrentPage,
91+
setVerificationId,
92+
executeCaptcha,
93+
]
8694
);
8795

8896
return {

0 commit comments

Comments
 (0)