Authentication APIs
Initiate Login
Initialize a login request for a user.
POST
/dapp/initiate-login
Headers
| Header | Value | Description |
|---|---|---|
| client_id | YOUR_CLIENT_ID | Your unique client ID |
| client_secret | YOUR_SECRET_KEY | Your secret key |
| content-type | application/json | Content type of the request |
Body
| Name | Type | Required | Description |
|---|---|---|---|
| redirectUrl | string | Yes | URL to redirect after login completion |
Response
{
"redirectUrl": "MASWALLET_FRONTEND_URL/sign/login/{sessionId}",
"sessionId": "unique-session-id"
}
Verify Login Signature
Verify the signature provided by the user to complete the login process.
POST
/dapp/verify-login-signature
Headers
| Header | Value | Description |
|---|---|---|
| client_id | YOUR_CLIENT_ID | Your unique client ID |
| client_secret | YOUR_SECRET_KEY | Your secret key |
| content-type | application/json | Content type of the request |
Body
| Name | Type | Required | Description |
|---|---|---|---|
| nonce | string | Yes | The login session nonce |
| signature | string | Yes | The signature to verify |
| walletAddress | string | Yes | The wallet address that signed |