Skip to content

Commit bb75c64

Browse files
author
Boopathi
committed
chore: remove reCAPTCHA feature and all related code
1 parent a58d0df commit bb75c64

File tree

7 files changed

+6
-56
lines changed

7 files changed

+6
-56
lines changed

out/404.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

out/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

out/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ s.defer = true;
5858
s.src = "https://salesiq.zohopublic.in/widget";
5959
var t = d.getElementsByTagName("script")[0];
6060
t.parentNode.insertBefore(s, t);
61-
0:["3x7E6Naumm4Xm9tM5g05x",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$2",null,{"fallback":["$","div",null,{"children":"Loading..."}],"children":["$","$L3",null,{}]}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5e93fa8544d81b66.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_19640c __variable_9f6af0","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"$4"}}]}],["$","body",null,{"className":"antialiased bg-background font-sans","children":[["$","div",null,{"className":"flex flex-col min-h-screen","children":[["$","div",null,{"className":"hidden dark:block","children":["$","$L5",null,{}]}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","$L8",null,{}],"notFoundStyles":[]}]]}],["$","$L9",null,{}],["$","$La",null,{"id":"zoho-salesiq-script","strategy":"lazyOnload","children":"$b"}],["$","$La",null,{"src":"https://www.google.com/recaptcha/enterprise.js?render=6LfZ4H8rAAAAAA0NMVH1C-sCiE9-Vz4obaWy9eUI","strategy":"lazyOnload"}]]}]]}]],null],null],["$Lc",null]]]]
61+
0:["lcgvIItoEPAZMNBs7q-tD",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$2",null,{"fallback":["$","div",null,{"children":"Loading..."}],"children":["$","$L3",null,{}]}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/5e93fa8544d81b66.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_19640c __variable_9f6af0","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"$4"}}]}],["$","body",null,{"className":"antialiased bg-background font-sans","children":[["$","div",null,{"className":"flex flex-col min-h-screen","children":[["$","div",null,{"className":"hidden dark:block","children":["$","$L5",null,{}]}],["$","$L6",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","$L8",null,{}],"notFoundStyles":[]}]]}],["$","$L9",null,{}],["$","$La",null,{"id":"zoho-salesiq-script","strategy":"lazyOnload","children":"$b"}]]}]]}]],null],null],["$Lc",null]]]]
6262
c:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Hustloop | Connect, Collaborate, Build Stronger Startup & Innovators Meet"}],["$","meta","3",{"name":"description","content":"A prototype startup platform that includes modules such as Blog, Mentors, Incubators, Pricing, and MSMEs."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"48x48"}],["$","meta","5",{"name":"next-size-adjust"}]]
6363
1:null

src/app/globals.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,4 @@
212212
height: 200px;
213213
transform: translate(30%, 40%);
214214
background: radial-gradient(circle, hsl(var(--accent) / 0.5) 0%, transparent 70%);
215-
}
216-
217-
/* Move reCAPTCHA badge to the bottom left */
218-
.grecaptcha-badge {
219-
left: 20px !important;
220-
right: auto !important;
221-
bottom: 20px !important;
222215
}

src/app/layout.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ s.src = "https://salesiq.zohopublic.in/widget";
100100
t.parentNode.insertBefore(s, t);
101101
`}
102102
</Script>
103-
<Script
104-
src="https://www.google.com/recaptcha/enterprise.js?render=6LfZ4H8rAAAAAA0NMVH1C-sCiE9-Vz4obaWy9eUI"
105-
strategy="lazyOnload"
106-
/>
107103
</body>
108104
</html>
109105
);

src/components/auth/login-modal.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ interface LoginModalProps {
4646
onLoginSuccess: (data: { role: UserRole, token: string, hasSubscription: boolean, name: string, email: string, authProvider: AuthProvider }) => void;
4747
}
4848

49-
declare global {
50-
interface Window {
51-
grecaptcha: any;
52-
}
53-
}
54-
5549
export default function LoginModal({ isOpen, setIsOpen, onLoginSuccess }: LoginModalProps) {
5650
const { toast } = useToast();
5751
const router = useRouter();
@@ -66,26 +60,13 @@ export default function LoginModal({ isOpen, setIsOpen, onLoginSuccess }: LoginM
6660

6761
const { formState: { isSubmitting }, getValues } = form;
6862

69-
const executeRecaptcha = (action: 'login' | 'register'): Promise<string> => {
70-
return new Promise((resolve, reject) => {
71-
if (!window.grecaptcha || !window.grecaptcha.enterprise) {
72-
toast({ variant: 'destructive', title: 'reCAPTCHA Error', description: 'reCAPTCHA not loaded. Please try again.' });
73-
return reject('reCAPTCHA not loaded');
74-
}
75-
window.grecaptcha.enterprise.ready(() => {
76-
window.grecaptcha.enterprise.execute('6LfZ4H8rAAAAAA0NMVH1C-sCiE9-Vz4obaWy9eUI', { action }).then(resolve).catch(reject);
77-
});
78-
});
79-
};
80-
8163
const handlePasswordLogin = async (values: LoginSchema) => {
8264
if (!auth) {
8365
toast({ variant: 'destructive', title: 'Error', description: 'Authentication service is not available.' });
8466
return;
8567
}
8668

8769
try {
88-
const recaptchaToken = await executeRecaptcha('login');
8970
const userCredential = await signInWithEmailAndPassword(auth, values.email, values.password);
9071
const firebaseUser = userCredential.user;
9172

@@ -98,7 +79,6 @@ export default function LoginModal({ isOpen, setIsOpen, onLoginSuccess }: LoginM
9879
const response = await fetch(`${API_BASE_URL}/api/login`, {
9980
method: 'POST',
10081
headers: { 'Authorization': `Bearer ${idToken}`, 'Content-Type': 'application/json' },
101-
body: JSON.stringify({ recaptchaToken })
10282
});
10383
const data = await response.json();
10484

src/components/auth/signup-modal.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ interface SignupModalProps {
4848
setIsOpen: (isOpen: boolean) => void;
4949
}
5050

51-
declare global {
52-
interface Window {
53-
grecaptcha: any;
54-
}
55-
}
56-
5751
export default function SignupModal({ isOpen, setIsOpen }: SignupModalProps) {
5852
const { toast } = useToast();
5953
const router = useRouter();
@@ -69,25 +63,12 @@ export default function SignupModal({ isOpen, setIsOpen }: SignupModalProps) {
6963

7064
const { formState: { isSubmitting } } = form;
7165

72-
const executeRecaptcha = (action: 'login' | 'register'): Promise<string> => {
73-
return new Promise((resolve, reject) => {
74-
if (!window.grecaptcha || !window.grecaptcha.enterprise) {
75-
toast({ variant: 'destructive', title: 'reCAPTCHA Error', description: 'reCAPTCHA not loaded. Please try again.' });
76-
return reject('reCAPTCHA not loaded');
77-
}
78-
window.grecaptcha.enterprise.ready(() => {
79-
window.grecaptcha.enterprise.execute('6LfZ4H8rAAAAAA0NMVH1C-sCiE9-Vz4obaWy9eUI', { action }).then(resolve).catch(reject);
80-
});
81-
});
82-
};
83-
8466
const handleSignup = async (values: SignupSchema) => {
8567
try {
86-
const recaptchaToken = await executeRecaptcha('register');
8768
const response = await fetch(`${API_BASE_URL}/api/register`, {
8869
method: 'POST',
8970
headers: { 'Content-Type': 'application/json' },
90-
body: JSON.stringify({ ...values, recaptchaToken }),
71+
body: JSON.stringify({ ...values }),
9172
});
9273

9374
const data = await response.json();

0 commit comments

Comments
 (0)