> For the complete documentation index, see [llms.txt](https://authento.gitbook.io/authento-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://authento.gitbook.io/authento-api/authento-react/useverifypopup.md).

# useVerifyPopup

A custom React hook to launch a verification popup for address-based verifications.

{% hint style="success" %}
Using this hook will keep the Authento verification popup safe from being blocked by the built-in popup blockers of major browsers.
{% endhint %}

## Usage

```javascript
import { useVerifyPopup } from "authento-react";

export const MyComponent = () => {
  const { verifyBasic, status } = useVerifyPopup({
    domainName: "YOUR_DOMAIN_NAME",
    messageText: 
      "Sign this message to prove your ownership of this address and " +
      "proceed with the identity verification process."
  });

  return (
    <div>
      <button onClick={verifyBasic}>Verify</button>
      {status === "pending" && <p>Pending user signature</p>}
      {status === "success" && <p>Signature generated successfully</p>}
      {status === "error" && <p>Failed to generate signature</p>}
    </div>
  );
};
```

{% hint style="info" %}
An active wallet connection is required for the `verify` method to function properly. You can learn more about wallet connections [here](https://wagmi.sh/react/hooks/useConnect).
{% endhint %}

## Configuration

The `useVerifyPopup` hook accepts a configuration object with the following properties:

* `domainName` (required): Your domain name registered with Authento. Please contact us if you are unsure of its value.
* `messageText` (required): The text of the verification message. Unless otherwise communicated, this should be set to

  <pre data-overflow="wrap"><code>Sign this message to prove your ownership of this address and proceed with the identity verification process.
  </code></pre>
* `authentoUrl` (optional): The URL of the Authento website (default: "[https://app.authento.io](https://www.authento.io/)"). For testing, this should be set to "<https://demo-app.authento.io>".
* `userType` (optional): Preset user type (either "INDIVIDUAL" or "CORPORATE"). New users will be prompted to choose their own user type if this is unset.

## Return Value

The `useVerifyPopup` hook returns an object with the following properties:

* `verifyBasic`: A function that initiates the basic verification process. When this function is called, the hook will open a popup window for the user to complete the verification process.
* `verifyPoa`: A function that initiates the proof of address verification process. When this function is called, the hook will open a popup window for the user to complete the verification process.
* `status`: The current status of the signature generation process, which can be one of the following values: "unstarted", "pending", "success", or "error".
