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
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user