apinow-sdk 0.28.0 → 0.28.1
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/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86,7 +86,10 @@ export function createClient(config) {
|
|
|
86
86
|
async function signAuthHeader() {
|
|
87
87
|
const issuedAt = new Date().toISOString();
|
|
88
88
|
const nonce = Math.random().toString(36).slice(2) + Date.now().toString(36);
|
|
89
|
-
|
|
89
|
+
// Single-line format: Chrome's fetch() rejects header values containing
|
|
90
|
+
// raw newlines ("Failed to execute 'fetch' on 'Window': Invalid value").
|
|
91
|
+
// Server parses via regex so space-separated works identically.
|
|
92
|
+
const message = `APINow auth | address: ${address} | issuedAt: ${issuedAt} | nonce: ${nonce}`;
|
|
90
93
|
const signature = await signMessage(message);
|
|
91
94
|
return {
|
|
92
95
|
Authorization: `Bearer ${message}||${signature}||${address}`,
|
package/package.json
CHANGED