You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,10 +153,10 @@ _What to get and configure:_
153
153
- For user workflows for reset password and verify email
154
154
- For contact form processing
155
155
- reCAPTCHA
156
-
- For contact form submission
156
+
- For contact form submission, but you can skip it during your development
157
157
- OAuth for social logins (Sign in with / Login with)
158
158
- Depending on your application need, obtain keys from Google, Facebook, X (Twitter), LinkedIn, Twitch, GitHub. You don't have to obtain valid keys for any provider that you don't need. Just remove the buttons and links in the login and account pug views before your demo.
159
-
- API keys for service providers in the API Examples if you are planning to use them.
159
+
- API keys for service providers that you need in the API Examples if you are planning to use them.
Copy file name to clipboardExpand all lines: controllers/contact.js
+19-8Lines changed: 19 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,13 @@ async function validateReCAPTCHA(token) {
18
18
exports.getContact=(req,res)=>{
19
19
constunknownUser=!req.user;
20
20
21
+
if(!process.env.RECAPTCHA_SITE_KEY){
22
+
console.warn('\x1b[33mWARNING: RECAPTCHA_SITE_KEY is missing. Add a key to your .env, env variable, or use a WebApp Firewall with an interactive challenge before going to production.\x1b[0m');
23
+
}
24
+
21
25
res.render('contact',{
22
26
title: 'Contact',
23
-
sitekey: process.env.RECAPTCHA_SITE_KEY,
27
+
sitekey: process.env.RECAPTCHA_SITE_KEY||null,// Pass null if the key is missing
console.warn('\x1b[33mWARNING: RECAPTCHA_SITE_KEY is missing. Add a key to your .env or use a WebApp Firewall for CAPTCHA validation before going to production.\x1b[0m');
48
+
validationErrors.push({msg: 'Server configuration error. Please try again later.'});
0 commit comments