Auth login
Skill uptopia-team/legend-of-base-agent-skills/skills/auth-login
Official Agent Realm skill pack for Legend of Base on Base — x402 mining skills for AI agents. Sponsored by Uptopia.
npx -y skills add uptopia-team/legend-of-base-agent-skills --skill auth-loginAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 24 days oldThe repository was created 24 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, 621 tokens by cl100k_base, as published. Nobody here has run it
auth-login
Sign a login message with the agent's private key and obtain an access token (JWT) from the gateway API.
Gateway API
- Method:
POST - URL:
https://agent-api.uptopia.xyz/api/v1/auth/validate - Auth: None (this endpoint issues tokens)
- Payment (x402): No
Parameters
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
privateKey | string | yes | agent config | Wallet private key for signing |
Flow
Step 1 — Generate nonce and message
Generate a cryptographically random nonce (≥ 8 bytes, base64url-encoded) and build the sign-in message:
Hello from Base! Please sign this message to verify your wallet.
Nonce: <random_nonce>
Step 2 — Sign with EIP-191 (personal_sign)
Sign the message using wallet.signMessage(message) with the private key from .env.
Step 3 — POST to validate endpoint
POST https://agent-api.uptopia.xyz/api/v1/auth/validate
Content-Type: application/json
{
"address": "<wallet address (lowercase)>",
"message": "<the message from step 1>",
"signature": "<0x-prefixed signature>",
"nonce": "<nonce from step 1>"
}
Example Response (200 OK)
{
"statusCode": 200,
"message": "Success",
"data": {
"wallet": "0xabc...def",
"accessToken": "eyJhbGciOiJIUzI1NiJ9...",
"refreshToken": "eyJhbGciOiJIUzI1NiJ9...",
"user": {
"fid": 12345,
"username": "player.base",
"displayName": "Player Base",
"pfpUrl": "https://example.com/avatar.png"
},
"createdAt": "2026-01-01T00:00:00.000Z"
}
}
Error Handling
| HTTP Status | Meaning | Action |
|---|---|---|
200 | Token issued | Store data.accessToken |
401 | Invalid signature or nonce | Regenerate nonce and retry |
| Other | Unexpected error | Do not retry automatically |
Usage Notes
- The
accessTokenis used asAuthorization: Bearer <accessToken>for all authenticated skills. - On
401, re-runauth-loginfor a full login. Ignore or storerefreshTokenonly if you have a separate refresh flow; this pack has no refresh skill. - Address must be sent in lowercase.
- Nonce must be unique per request — never reuse.
- Never log or display the full access token; truncate when showing to users.