I have a wrapper function then hits grecaptcha functions. I pass an action and key and gets a token.
await getgrToken('register', key);\
This works perfect. I get the token back.
However if I pass a new action it comes back with an undefined error
await getgrToken('login', key);
Do I need to decalre the action somewhere?