Problem with reCAPTCHA enterprise - Moodle on new domain.

Problem with reCAPTCHA enterprise - Moodle on new domain.

by Rick Jerz -
Number of replies: 6
Picture of Particularly helpful Moodlers Picture of Testers

A little while ago, I moved my Moodle to a new domain.  Most recently, reCAPTCHA was showing an "ERROR for site owner: Invalid key type" for email authentication.  I am unsure if this was due to the new domain, or something about my old reCAPTCHA keys expiring.  Here's the error.

reCAPTCHA%20error.jpeg

So, I went to my Google account and created a set of new keys, put the keys into Moodle, and continue to get the same error message.

However, in my Google admin panel, I noticed that the "Key Status" shows "incomplete."  It shows that I need to "Finish setting up your key: Request tokens."  

Request%20Tokens.jpeg

I go to the Request Tokens link and get this web page that doesn't make sense to me.  I might have to put some code into my website or something like that.  I expected a simple button that might say "Complete token request," but it doesn't exist.  I searched for how to "complete" my new Enterprise reCAPTCHA, but I had no luck.  I can't find anything.

So, I wonder if anyone else has experienced this problem.  How do I complete the new reCAPTCHA keys?

Average of ratings: -
In reply to Rick Jerz

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Ken Task -
Picture of Particularly helpful Moodlers
Sent you a PM but did notice on a little sluething ...
Screen shot shows a Moodle4 with a domain ... your current site is www.tld/moodle#?
So maybe in setup of reCaptcha enterprise (which is what version) you need to use www.  You are not really setting up a new domain - it's just a new moodle in a new subdirectory - the site www.tld hasn't changed.

Did see a tracker item about this where someone proposed Moodle begin to work on version 3 but it was tagged as 'Won't Do' and the reason given that Google hasn't dropped the older version yet.  Granted Moodle HQ has a lot to do ... I've always had the approach of preventative if I could, but ... like Moodle itself, 'legacy' (older versions) will eventually be dropped ... so maybe the time is now.

Been my experience with Google, that if one waits, there is usually more trouble, but that's just me.
Am experiencing that now with Google IAM and Moodles.  But that's Off Topic and really my own issue. :|

'SoS', Ken

In reply to Ken Task

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I have one VPS containing several domains. I set up Moodle4 on the domain www.edu-gen.com. It's actually at www.edu-gen.com/moodle4.  Perhaps I should try adding the "www" to my entry, or even add the "/moodle4"?

Google reCAPTCHA Enterprise, could be version 3, seems to only provide a site key, but there is a panel that let's you get a secret key.

In my screenshot, you will see Key Status as incomplete. That's where I am stuck. I can't figure out how one make it complete. I hoover that "incomplete" and get that dialog box to "Request tokens," but then that web page shows that doesn't help.

So, I appear to be the only one in the world who is trying to use reCAPTCHA Enterprise and experiencing this problem. Right?
In reply to Rick Jerz

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Ken Task -
Picture of Particularly helpful Moodlers
"...appear to be the only one in the world who is trying to use reCAPTCHA Enterprise and experiencing this problem."

Uhhhh, you might be! :|  Next time, when you post something like this, suggest adding a request that only those using respond.    I'll honor that! smile

I sent you a PM because posting one's site URL and other particulars is thought to be a 'no-no'.   And from personal experience, that is somewhat true.   There are 'black hats' that do 'scrape' (or lack of a better term) info they think they might be able to use in 'cracking a moodle'.  

But, you have now provided the FQDN - so ...

"Perhaps I should try adding the "www" to my entry, or even add the "/moodle4"?"

Dunno if it would work or not, but I'd try just www first .... do know in setting up IAM's for Moodle Google want's to know top level and not directories (such as your moodle4).   Call backs are specific however to directories/moodle code.

Then there is the issue with keys ... is that a Push (Google -> your Moodle) or a 'pull' (Your Moodle -> Google).   Yeah, I looked at the Google docs you linked to ... and find them just like their new requirements for IAM ... one has to be 'Google Certified' to know exactly which/what option and how ... did see reference to Google's CLI.    Did they provide a key that you are to plugin to config of your site?   They key provided ... is it clean ... no blank space in front and no blank space at the end?
Or was this key to be generated by Moodle first and then used in Google setup? (same thing though ... clean ... no errant blank characters that you can't see)

There are the 'standards' ... debugging to developer to see if Moodle has more info ... and checking servers error logs for a clue as well.

Ok - MoodleDum - (all of Moodle) anyone using the new version of reCaptcha ... please share your experience!!!!

'SoS', Ken

In reply to Ken Task

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
So, Ken, you don't use reCAPTCHA on any of your Moodle sites? If not, how do you protect against blots creating accounts? (I might be missing something.)

Yep, one must be a "google-geek" to read the Google docs. Oh well.

I let Google generate the keys. Yep, I have them but they don't work. My best guess is that "incomplete" and "token request" stuff. The Google docs show how to create a webpage via java (and other languages), but I don't want to do that, I just want the keys to work, like in the good old days.
 
(About any Google search with my name in it will get someone to my Moodle, so there is not much use to hiding it.  But I know what you mean.)

Visvanath alerted me to the problem of reCAPTCHA not working on my site.
In reply to Rick Jerz

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Ken Task -
Picture of Particularly helpful Moodlers
Don't use CAPTCHA.   I 'encourage' use of Google addresses ... have multiple Google IAM's setup per site.   As long as notification/confirmation emails can reach those that signed up, am good.

My courses are not that much in demand and don't offer certs or creds ... you've been into one of mine.   So I don't need to describe further.   I do take contributions via PayPay ... but have never gotten anything there.    Not lookin' to get rich at this ... that's for sure!

You offer college credit courses on your Moodle rather than your Uni's chosen Canvas.   Are those students required to have a uni address for the purpose of communications with the uni?
If so, restrict domains accepted by that criteria.

On your sign up page you could describe what addies your site will accept.
Just don't allow well-knowns - like hotmail.com, aol.com, etc.

As has always been the case ... sites a different ... we sometimes have to figure out what works best for us - and no one else can suggest something acceptable!!! smile

Am also a 'logwatcher' ... actually have installed an app called logwatch and it sends daily emails to an address of my choosing - also to a primary user on the server - daily reports of the day before's activity.   The web server section of that report shows 100's,200's,300's,*400's, and * 500's.
The ones in 400's - access denied - I check out the IP with whois ... and if I see it's an Amazon server or a Droplet or some other network server, I treat those as bots.   I'll block at the network layer that specific IP address or a range of IP addresses ... that traffic hits my nic and goes to a drop zone ... no reply, no hint of why ... they just can't connect.   Problem solved

'SoS', Ken


In reply to Ken Task

Re: Problem with reCAPTCHA enterprise - Moodle on new domain.

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I followed a LinkedIn Learning video, "Using CAPTCHA with contact forms," which was about Joomla. The author shows to pick V2 from www.google.com/recaptcha. I tried this and had success. The site and secret keys seem to be working.

I am unsure how long this will work, but for now I am good to go!