🔐
w3auth
  • Welcome!
  • Installing
  • CORS
  • Authentication Flow
  • Integration Example
  • KYC
  • External Backend
  • API Reference
    • Active Chains
    • Nonce
    • Verify nonce
    • Link Wallet
    • Unlink Wallet
    • Profile & Custom fields
    • Logout
  • Package
    • React JS
  • Connect API
    • Enable API
    • User details
    • Allowlist Address
    • Blocklist Address
    • Get Settings
    • NFT Gating
    • Token Gating
Powered by GitBook
On this page
  1. API Reference

Verify nonce

POST /api/auth/verify

Request Body

Name
Type
Description

signature*

String

encrypted

signed_message*

String

Make sure the string Nonce: & Address: is present in the signed message.

wallet_address*

String

{
    "success": "ok",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
    "name": "John doe",
    "user_id": "66c0ec0b-0354-446c-8676-228c1faf83f9"
}
{
   "error": "Invalid signature"
}

Store the token in the App state and include it in the headers.

 {
    Accept: 'application/json',
    'Authorization': `Bearer TOKEN`,
}

The refresh token is stored in the cookie. You can send a request to refresh API to get the new token. Make sure to include credentials to the refresh and logout API's.

PreviousNonceNextLink Wallet

Last updated 2 years ago