supabase-community / auth-ui

Pre-built Auth UI for React
https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
MIT License
483 stars 120 forks source link

HCaptcha support #38

Open dukesx opened 1 year ago

dukesx commented 1 year ago

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

Charizard13 commented 1 year ago

Really important for us we use this

antonioglass commented 1 year ago

Are there any updates?

jaxony commented 9 months ago

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.

hexrw commented 8 months ago

How is this not supported yet??

hexrw commented 3 months ago

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

Charizard13 commented 3 months ago

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

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

hexrw commented 3 months ago

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 hexrw.arming310@passinbox.com

gururise commented 1 month ago

@Charizard13 Any progress?

hexrw commented 1 month ago

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