Auth
FIX
To obtain a JWT token for accessing AUTH endpoints, users should follow a two-step process. First, they need to submit their public signer address and account addres to the endpoint by making a GET request to /sign/request_sign_data?user=<signer_account|starknet_account>account=<starknet_account>
.
After receiving the message to sign, users must sign the following typed message with their private key.
The second step involves submitting the signed message to the endpoint /sign/auth
using a POST request. In the request data, users should provide a JSON object containing the message (msg) as an integer and the signature (r and s) as a list of integers. The structure of the JSON data should be as follows:
{'msg': <msg integer>, 'signature': [<r integer>, <s integer>]}
.
It's important to note that the HTTP status code for both steps is always 200, indicating successful communication and processing of the request.
In Python, one can use message_signature
from the starknet_py library to sign the message to obtain a signature. For reference please check SDK section.
Last updated