Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ce54a6886a | |||
| 05170db4f7 |
2
app/web/dist/bundle.js
vendored
2
app/web/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
2
app/web/dist/bundle.js.map
vendored
2
app/web/dist/bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -76,7 +76,8 @@
|
||||
};
|
||||
|
||||
const signedEvent = await signer.signEvent(authEvent);
|
||||
return btoa(JSON.stringify(signedEvent));
|
||||
// Use URL-safe base64 encoding
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
} catch (err) {
|
||||
console.error("Error creating Blossom auth:", err);
|
||||
return null;
|
||||
|
||||
@@ -75,7 +75,8 @@
|
||||
};
|
||||
|
||||
const signedEvent = await userSigner.signEvent(authEvent);
|
||||
return btoa(JSON.stringify(signedEvent));
|
||||
// Use URL-safe base64 encoding (replace + with -, / with _, remove padding)
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
} catch (err) {
|
||||
console.error("Error creating auth header:", err);
|
||||
return null;
|
||||
@@ -94,8 +95,9 @@
|
||||
}
|
||||
|
||||
try {
|
||||
const authHeader = await createAuthHeader("GET", "/api/logs");
|
||||
const url = `${window.location.origin}/api/logs?offset=${offset}&limit=${LIMIT}`;
|
||||
const path = `/api/logs?offset=${offset}&limit=${LIMIT}`;
|
||||
const authHeader = await createAuthHeader("GET", path);
|
||||
const url = `${window.location.origin}${path}`;
|
||||
const response = await fetch(url, {
|
||||
headers: authHeader ? { Authorization: `Nostr ${authHeader}` } : {},
|
||||
});
|
||||
|
||||
@@ -30,7 +30,8 @@ export async function createNIP98Auth(signer, pubkey, method, url) {
|
||||
|
||||
// Sign using the signer
|
||||
const signedEvent = await signer.signEvent(authEvent);
|
||||
return btoa(JSON.stringify(signedEvent));
|
||||
// Use URL-safe base64 encoding
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
} catch (error) {
|
||||
console.error("Error creating NIP-98 auth:", error);
|
||||
return null;
|
||||
|
||||
@@ -1 +1 @@
|
||||
v0.39.0
|
||||
v0.39.2
|
||||
|
||||
Reference in New Issue
Block a user