Git Product home page Git Product logo

Comments (13)

douglasjunior avatar douglasjunior commented on September 6, 2024

Hi @chenop, I dont know about reCAPTCHA Enterprise, do you have any documentation about it?

from react-native-recaptcha-that-works.

chenop avatar chenop commented on September 6, 2024

Comparison
Recaptcha Enterprise

from react-native-recaptcha-that-works.

douglasjunior avatar douglasjunior commented on September 6, 2024

Looks like the client migration is simple.

https://cloud.google.com/recaptcha-enterprise/docs/using-features

image

from react-native-recaptcha-that-works.

maxwell353 avatar maxwell353 commented on September 6, 2024

Efetuei as modificações no arquivo get-template.js referente a https://cloud.google.com/recaptcha-enterprise/docs/using-features, mas mesmo assim minha sitekey não funciona.
Sua chave api: 6LejsqwZAAAAAGsmSDWH5g09dOyNoGMcanBllKPF, funciona corretamente.
Minha chave: 6LeWo-0bAAAAAEUZsokYlBi8E6LiXjIV87KrQL-w, retorna erro null.
Se possível demonstre o procedimento para criar uma sitekey.

from react-native-recaptcha-that-works.

victor-cui-brigit avatar victor-cui-brigit commented on September 6, 2024

Will the library work out of the box? when creating a mobile reCAPTCHA key for enterprise, it says to specify iOS or Android.

image

from react-native-recaptcha-that-works.

douglasjunior avatar douglasjunior commented on September 6, 2024

Today, this library uses WebView to work with reCAPTCHA v2 only. Currently, we have no plan to implement Enterprise mobile reCAPTCHA.

But, any contributions are welcome.

from react-native-recaptcha-that-works.

victor-cui-brigit avatar victor-cui-brigit commented on September 6, 2024

hmm I created a reCAPTCHA v3 key on https://www.google.com/u/1/recaptcha/admin/site/493612296 (not enterprise) and the library was able to verify and generate a token. Perhaps the library will work with v3 as long as it's not enterprise mobile?

from react-native-recaptcha-that-works.

douglasjunior avatar douglasjunior commented on September 6, 2024

Done in 1.2.0 https://github.com/douglasjunior/react-native-recaptcha-that-works/releases/tag/1.2.0

from react-native-recaptcha-that-works.

Oliveirax avatar Oliveirax commented on September 6, 2024

Does this lib work with recaptcha enterprise? If yes, then how? I created ios and android keys, as well as a web key and every one of them returns "Error: null" from the error callback. for a brief moment, we can see an error in the device screen
IMG_4211

from react-native-recaptcha-that-works.

douglasjunior avatar douglasjunior commented on September 6, 2024

Does this lib work with recaptcha enterprise? If yes, then how? I created ios and android keys, as well as a web key and every one of them returns "Error: null" from the error callback. for a brief moment, we can see an error in the device screen !

Nothing special, just add enterprise={true}:

            <Recaptcha
                ref={recaptcha}
                siteKey="<your-recaptcha-public-key>"
                baseUrl="http://my.domain.com"
                onVerify={onVerify}
                onExpire={onExpire}
                enterprise={true}
            />

from react-native-recaptcha-that-works.

Oliveirax avatar Oliveirax commented on September 6, 2024

Nothing special, just add enterprise={true}:

Yes. I got that. But that is not the issue. The issue is how do I fill in the baseUrl field? iOS and Android keys don't have a baseURL / domain to define. You only define the app package name. And a web key does have a domain to define, but still does not work. What am I doing wrong?

My code:

const RecaptchaTest: React.FC = () => {
  const recaptcha = useRef<RecaptchaHandles>(null)

  const handleOpen = useCallback(() => {
    console.log('open button!')
    recaptcha.current?.open()
  }, [])

  const handleClose = useCallback(() => {
    console.log('close button!')
    recaptcha.current?.close()
  }, [])

  const onLoad = () => {
    console.log('load!')
  }

  const onVerify = (token: string) => {
    console.log('success!', token)
  }

  const onExpire = () => {
    console.log('expired!')
  }

  const onError = (error: string) => {
    console.log('Error: ', error)
  }

  const onClose = () => {
    console.log('Close!')
  }

  return (
    <View>
      <Recaptcha
        ref={recaptcha}
        lang="en"
        headerComponent={<Button title="Close" onPress={handleClose} />}
        siteKey="6LckJ1gjAAAAAPUcfXRG3khTGDRJxiMTim-8ph1N"
        baseUrl="com.anova.unify.go"
        onVerify={onVerify}
        onExpire={onExpire}
        onError={onError}
        onLoad={onLoad}
        onClose={onClose}
        size="normal"
        enterprise={true}
        action={'login'}
        hideBadge={false}
      />
      <Button title="Open" onPress={handleOpen} />
    </View>
  )
}

from react-native-recaptcha-that-works.

douglasjunior avatar douglasjunior commented on September 6, 2024

Yes. I got that. But that is not the issue. The issue is how do I fill in the baseUrl field? iOS and Android keys don't have a baseURL / domain to define. You only define the app package name. And a web key does have a domain to define, but still does not work. What am I doing wrong?

Take a look at #34

from react-native-recaptcha-that-works.

Oliveirax avatar Oliveirax commented on September 6, 2024

Got it working, but with two small caveats: I used the web key (not the iOS or Android key), and used the prop "size" as "invisible". Any other size will return the null error.

Thank you for the help @douglasjunior.

from react-native-recaptcha-that-works.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.