Supabase | Sign In | One-Time Password | hCaptcha — I can't use it in workflow weweb

I need to implement Auth supabase with OTP. Does anyone know a way to get an hcaptcha token? I pasted it into the page, the verification is completed correctly, but I can’t find a way to transfer the token that hcaptcha receives after verification to Supabase.

Solved, thanks ChatGPT.

return (() => {
    const iframe = document.querySelector('.h-captcha iframe');
    return iframe ? iframe.getAttribute('data-hcaptcha-response') : null;
})();

But a second problem arises during verification

name: “TypeError”
stack: "TypeError: Cannot read properties of null (reading ‘map’) at Object.getUserRoles
message: “Cannot read properties of null (reading ‘map’)”

Can anyone help?

The second problem was solved by connecting roles via Auth supabase.

1 Like