Harden auth cookies and fix native schema for event creation
Mirror to GitHub / mirror (push) Successful in 45s
Test and Lint / backend-test (push) Successful in 1m37s
Test and Lint / frontend-test (push) Successful in 2m8s
Version and Release / version-bump (push) Successful in 1m0s
Version and Release / trigger-drone (push) Successful in 3s

This commit is contained in:
2025-09-18 15:58:58 +02:00
parent bda76ff513
commit 71e7179145
35 changed files with 1055 additions and 381 deletions
+3 -14
View File
@@ -49,21 +49,10 @@ class SecureTokenService {
}
try {
// Get the gallery token from localStorage
const galleryToken = localStorage.getItem(`gallery_token_${slug}`);
if (!galleryToken) {
throw new Error('No gallery authentication token found');
}
// Generate new token from backend with explicit auth header
// Generate new token from backend authentication handled via cookies
const response = await api.post<SecureToken>(
`/secure-images/${slug}/generate-token`,
{ photoId, accessType },
{
headers: {
'Authorization': `Bearer ${galleryToken}`
}
}
{ photoId, accessType }
);
const tokenData: SecureToken = {
@@ -190,4 +179,4 @@ if (typeof window !== 'undefined') {
setInterval(() => {
secureTokenService.clearExpiredTokens();
}, 5 * 60 * 1000);
}
}