0.2.2 • Published 7 months ago

mango-domain-validate v0.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

Mango Domain Validate SDK 👋

Mango Domain Validate Integration SDK provides a lightweight and secure SDK providing seamless user authentication using Mango Domains.

Installation

Node Package

Install mango-domain-validate npm

  npm i mango-domain-validate

Add and initialize the Mango Domain Validate SDK

Initialize

server.js
import MangoDomainValidator from "mango-domain-validate";

// Initialize the SDK
const validate = new MangoDomainValidator();

Sign in existing users

Login with mmit domain

try {
    const result = await validate.validateUser(domain, tokenId);
    console.log(result.data);
} catch (error) {
    console.log(error)
}

Parameters ⤵️

domain (string): Users domain name. It should always end with .mmit.
tokenId (number): Unique tokenId generated at the time of minting the domain.

Output success ⤵️

{
"success": true,
"message": "User validated"
}

Output Failure ⤵️

{
"success": false,
"message": "Credentials Not Valid"
}
0.2.2

7 months ago

0.2.1

7 months ago

0.2.0

7 months ago

0.1.0

7 months ago