auth-ui icon indicating copy to clipboard operation
auth-ui copied to clipboard

HCaptcha support

Open dukesx opened this issue 3 years ago • 14 comments

Feature request

Is your feature request related to a problem? Please describe.

Yes, For Combatting spam. Would love to have H-Captcha Intergrated directly inside auth ui.

Describe the solution you'd like

1, Just add it as dependency or let us specify a "React Node" that we can pass as a component so that before the FORM SUBMIT button, there is a captcha, 2, Allow us to specify the verified token , which can then be taken as a state inside Auth UI so that depending on verification, the state changes and behaves accordingly (to give error or to allow auth request)

Since H-captcha has quite the presence inside the docs and Supabase even has the the server verifying it (as per dashboard auth option), i think this is a very legitimate request,

Describe alternatives you've considered

Imperfect Workarounds

dukesx avatar Oct 04 '22 17:10 dukesx

Really important for us we use this

Charizard13 avatar Oct 24 '22 19:10 Charizard13

Are there any updates?

antonioglass avatar Apr 14 '23 13:04 antonioglass

It would be amazing if HCaptcha could be supported inside AuthUI. At the moment, the best option for me is to copy the code / fork, which isn't ideal.

jaxony avatar Nov 29 '23 04:11 jaxony

How is this not supported yet??

hexrw avatar Dec 28 '23 12:12 hexrw

If there still isn't a response soon I'm taking this on

hexrw avatar May 13 '24 11:05 hexrw

If there still isn't a response soon I'm taking this on

I want to help you add more features to this @hexrw

Charizard13 avatar May 13 '24 12:05 Charizard13

If there still isn't a response soon I'm taking this on

I want to help you add more features to this @hexrw

Reach out to me at [email protected]

hexrw avatar May 15 '24 17:05 hexrw

@Charizard13 Any progress?

gururise avatar Jul 07 '24 08:07 gururise

I'm taking this on. I will be making a fork that will utilize the native custom elements, I want to take this project to the direction Swiper.js is taking for example with their Swiper elements library, not focusing on any particular frameworks but instead giving everyone a solid vanilla solution. I'm going to actively work on this fork and hopefully it will make it's way here, into supabase-community. I will absolutely maintain the current APIs and everything so that little change is required to migrate from the current libraries. Using the library will be as simple as this (approximately) (Vue.js example):

<script setup>
  // Import predefined theme
  import { ThemeSupa } from '@supabase/auth-ui-shared'
  import { createClient } from '@supabase/supabase-js'

  import { register } from '@supabase-community/auth-elements'

  const supabaseClient = createClient(
    '<INSERT PROJECT URL>',
    '<INSERT PROJECT ANON API KEY>'
  )
  
 onMounted(() => register())
</script>

<template>
  <sb-auth
    :supabaseClient="supabaseClient"
    :appearance="{
      theme: ThemeSupa
    }"
  ></sb-auth>
</template>

@Charizard13 @gururise

hexrw avatar Jul 08 '24 20:07 hexrw

@hexrw Any progress? It's a bummer this repo isn't maintained, there are active PR's ready that aren't being merged.

This issue doesn't seem like an awfully hard pull request. It's just adding a captchaToken field within options. This merged PR where additionalData functionality was added and fixes #168 is a good start.

ashaltu avatar Sep 22 '24 20:09 ashaltu

@MildTomato @silentworks @J0 Anyway idea if this repo will be handed to community to maintain and if not, are there future plans to maintain this repo?

If no future plans, it'd be beneficial for us to know so we can decide if we need to stop using this module. For example, I have the Auth component used in a production system. We recently decided to setup captcha after suspicious bot-like requests, but given captcha isn't integrated with the Auth component, we are stuck between hoping a simple PR to include this feature will be merged or completely removing the usage of the Auth component and replacing it with supabase APIs.

ashaltu avatar Sep 22 '24 20:09 ashaltu

@ashaltu I think this notice states the state of this repo https://github.com/supabase-community/auth-ui?tab=readme-ov-file#maintenance-mode

silentworks avatar Sep 25 '24 11:09 silentworks

@hexrw Any progress? It's a bummer this repo isn't maintained, there are active PR's ready that aren't being merged.

This issue doesn't seem like an awfully hard pull request. It's just adding a captchaToken field within options. This merged PR where additionalData functionality was added and fixes #168 is a good start.

I've been very busy in the recent weeks. I expect to finish my fork of this project some time in the upcoming month. Here's a link https://github.com/hexrw/sb-auth

hexrw avatar Sep 26 '24 20:09 hexrw