cyberdyne-mcp 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/onboard.js +3 -2
- package/package.json +1 -1
- package/src/onboard.ts +3 -2
package/dist/onboard.js
CHANGED
|
@@ -180,8 +180,9 @@ export async function onboard(env = process.env, opts = {}) {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
const jar = new Map();
|
|
183
|
-
// 1. nonce
|
|
184
|
-
|
|
183
|
+
// 1. nonce — the platform binds the nonce to the signer address (hardening), so the
|
|
184
|
+
// nonce endpoint REQUIRES ?address=<wallet>; omitting it returns 400.
|
|
185
|
+
const nonceRes = await fetch(`${apiUrl}/api/auth/siwe/nonce?address=${address}`, { headers: { accept: "application/json" } });
|
|
185
186
|
if (!nonceRes.ok)
|
|
186
187
|
throw new Error(`GET /api/auth/siwe/nonce → ${nonceRes.status}`);
|
|
187
188
|
collectCookies(nonceRes, jar); // carry siwe-nonce to verify
|
package/package.json
CHANGED
package/src/onboard.ts
CHANGED
|
@@ -224,8 +224,9 @@ export async function onboard(
|
|
|
224
224
|
|
|
225
225
|
const jar = new Map<string, string>();
|
|
226
226
|
|
|
227
|
-
// 1. nonce
|
|
228
|
-
|
|
227
|
+
// 1. nonce — the platform binds the nonce to the signer address (hardening), so the
|
|
228
|
+
// nonce endpoint REQUIRES ?address=<wallet>; omitting it returns 400.
|
|
229
|
+
const nonceRes = await fetch(`${apiUrl}/api/auth/siwe/nonce?address=${address}`, { headers: { accept: "application/json" } });
|
|
229
230
|
if (!nonceRes.ok) throw new Error(`GET /api/auth/siwe/nonce → ${nonceRes.status}`);
|
|
230
231
|
collectCookies(nonceRes, jar); // carry siwe-nonce to verify
|
|
231
232
|
const { nonce } = (await nonceRes.json()) as { nonce?: string };
|