mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
fix: require reCAPTCHA token when reCAPTCHA is enabled (#12409)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: hieptl <hieptl.developer@gmail.com>
This commit is contained in:
@@ -12,7 +12,6 @@ import { TermsAndPrivacyNotice } from "#/components/shared/terms-and-privacy-not
|
||||
import { useRecaptcha } from "#/hooks/use-recaptcha";
|
||||
import { useConfig } from "#/hooks/query/use-config";
|
||||
import { displayErrorToast } from "#/utils/custom-toast-handlers";
|
||||
import { ENABLE_RECAPTCHA } from "#/utils/feature-flags";
|
||||
|
||||
export interface LoginContentProps {
|
||||
githubAuthUrl: string | null;
|
||||
@@ -39,7 +38,7 @@ export function LoginContent({
|
||||
|
||||
// reCAPTCHA - only need token generation, verification happens at backend callback
|
||||
const { isReady: recaptchaReady, executeRecaptcha } = useRecaptcha({
|
||||
siteKey: ENABLE_RECAPTCHA() ? config?.RECAPTCHA_SITE_KEY : undefined,
|
||||
siteKey: config?.RECAPTCHA_SITE_KEY,
|
||||
});
|
||||
|
||||
const gitlabAuthUrl = useAuthUrl({
|
||||
|
||||
@@ -20,4 +20,3 @@ export const ENABLE_TRAJECTORY_REPLAY = () =>
|
||||
export const USE_PLANNING_AGENT = () => loadFeatureFlag("USE_PLANNING_AGENT");
|
||||
export const ENABLE_PUBLIC_CONVERSATION_SHARING = () =>
|
||||
loadFeatureFlag("PUBLIC_CONVERSATION_SHARING");
|
||||
export const ENABLE_RECAPTCHA = () => loadFeatureFlag("RECAPTCHA");
|
||||
|
||||
Reference in New Issue
Block a user