🔓Auth
This route verifies the signature and the address provided. The route first checks if the nonce has been correctly signed by the user. The route then creates a session and generates tokens if the ownership of the public address is proven.
POST /api/v1/auth/login HTTP/1.1
Host: www.dyorbackend.tk
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"address": "text",
"signature": "text"
}
{
"ok": true,
"result": {
"access": "text",
"refresh": "text"
}
}
This route retrieves the cryptographic nonce of a wallet by address.The route first queries the database for the wallet by address provided.The route then returns the nonce of the found wallet.
GET /api/v1/auth/nonce/{address} HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
"ok": true,
"result": {
"nonce": 608560748621946800000
}
}
Needs Wallet Authentication
This route logouts of the app.The route first checks and finds the session saved in the database.The route then deletes the session found related to the wallet.
DELETE /api/v1/auth/logout HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
"ok": true,
"result": {}
}
Needs Wallet Authentication
This route refreshes the wallet session.The route first checks and finds the wallet session saved in the database.The route then deletes the session, creates a new one and generates new tokens.
GET /api/v1/auth/refresh HTTP/1.1
Host: www.dyorbackend.tk
Accept: */*
{
"ok": true,
"result": {
"access": "text",
"refresh": "text"
}
}
Last updated