element-hq / element-hq/element-call

Recaptcha needs support for recapture v2 (check box)

Open
#644 1 comment 0 reactions 0 assignees View on GitHub
A-Login O-Occasional S-Major T-Defect
Dominant language
TypeScript
Stars
996
Forks
213
Avg merge
1d 8h
Merged PRs (30d)
55

Description

### Steps to reproduce

hello @robintown ,
as we have already written in chat #webrtc:matrix.org.

i have enabled recapture on [matrix.envs.net](http://matrix.envs.net/). (recapture v2 (check box))
but it looks like element-call used recapture v2 (invisible).

https://github.com/matrix-org/synapse/blob/develop/docs/CAPTCHA_SETUP.md
> Set the type to reCAPTCHA v2 using the "I'm not a robot" Checkbox option. This is the only type of captcha that works with Synapse.

```diff
--- a/src/auth/useRecaptcha.ts
+++ b/src/auth/useRecaptcha.ts
@@ -47,7 +47,7 @@ export const useRecaptcha = (sitekey: string) => {

window.grecaptcha.render(recaptchaId, {
sitekey,
- size: "invisible",
+ size: "normal",
callback: (response: string) => promiseRef.current?.resolve(response),
// eslint-disable-next-line @typescript-eslint/naming-convention
"error-callback": () => promiseRef.current?.reject(new Error()),
```

seems this was implemented with invisible captchas in mind in general.

`"grecaptcha.execute only works with invisible reCAPTCHA.`
![](https://matrix.envs.net/_matrix/media/r0/download/envs.net/830bcbcaa248d9b624b6ea8dbf68627f357fa89b)

maybe someone has an idea in the future how the problem can be fixed. Thank you very much

### Outcome

#### What did you expect?

#### What happened instead?

### Operating system

_No response_

### Browser information

_No response_

### URL for webapp

element-call.envs.net

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.