Implements
Index
Constructors
constructor
-
Parameters
-
container: any | string
-
Optional parameters: Object | null
-
Optional app: App | null
Returns RecaptchaVerifier
-
Properties
type
The application verifier type. For a reCAPTCHA verifier, this is 'recaptcha'.
Methods
clear
-
Clears the reCAPTCHA widget from the page and destroys the current instance.
Returns void
render
-
Renders the reCAPTCHA widget on the page.
Returns Promise<number>
A Promise that resolves with the reCAPTCHA widget ID.
verify
-
Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.
Returns Promise<string>
A Promise for the reCAPTCHA token.
An reCAPTCHA-based application verifier.
This class does not work in a Node.js environment.
The reCAPTCHA container parameter. This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to an element ID. The corresponding element must also must be in the DOM at the time of initialization.
The optional reCAPTCHA parameters. Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value 'invisible'.
The corresponding Firebase app. If none is provided, the default Firebase App instance is used. A Firebase App instance must be initialized with an API key, otherwise an error will be thrown.