Authento API
  • Welcome to Authento
  • Integration Guidance
    • Introduction
    • Address-Based Verification
      • Off-Chain Access Control
      • On-Chain Access Control
        • Digital Signature Verification
        • Merkel Proof Verification
    • Account-Based Verification
    • Webhooks
  • API Reference
    • General Information
    • Endpoints
      • Get Basic User Info
      • Get Full User Info
  • Authento-react
    • Getting Started
    • useSignature
    • useStatus
    • useTokenVerifyPopup
    • useVerifyPopup
Powered by GitBook
On this page
  • Usage
  • Configuration
  • Return Value
  1. Authento-react

useVerifyPopup

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

Using this hook will keep the Authento verification popup safe from being blocked by the built-in popup blockers of major browsers.

Usage

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>
  );
};

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

    Sign this message to prove your ownership of this address and proceed with the identity verification process.
  • 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".

PrevioususeTokenVerifyPopup

Last updated 1 year ago

An active wallet connection is required for the verify method to function properly. You can learn more about wallet connections .

authentoUrl (optional): The URL of the Authento website (default: ""). For testing, this should be set to "https://demo-app.authento.io".

here
https://app.authento.io