Auth - Wallet

Generate Wallet Nonce

Changed on

Generate a nonce for wallet signature verification.

The frontend should:

  1. Call this endpoint with the wallet address to get a nonce and message template
  2. Construct the message by filling in the template with wallet_address, nonce, and timestamp
  3. Request the user to sign the message with their Web3 wallet
  4. Submit the signature to POST /wallet/link

Nonces expire after 5 minutes and can only be used once.

post/api/v1/auth/wallet/nonce/{wallet_address}

Request

  • The document declares no server URL.
  • Auth
    • OAuth 2
      Authorization codehttps://auth.mor.org/oauth2/authorize
      Token URLhttps://auth.mor.org/oauth2/token
      Scopesaws.cognito.signin.user.admin, openid, email, profile
    • or HTTP bearer

Path parameters

wallet_addressstring required

Ethereum wallet address to generate nonce for (0x prefixed, 40 hex characters)

Response

Successful Response

noncestring required

Cryptographic nonce (64 hex characters)

message_templatestring required

Template for constructing the message to sign. Replace {wallet_address}, {nonce}, and {timestamp} with actual values.

expires_ininteger

Number of seconds until the nonce expires

Changes