fix: Implement gallery-specific authentication tokens

- Fix issue where different galleries shared authentication
- Store gallery tokens with slug-specific keys in localStorage
- Remove global gallery_token cookie approach
- Each gallery now maintains its own authentication state
- Add cleanup for legacy authentication data

This ensures that accessing different galleries requires separate authentication
and prevents cross-gallery authentication leakage.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-09 08:05:04 +02:00
parent c8cfce3e36
commit cf32b01356
4 changed files with 73 additions and 27 deletions
+2 -2
View File
@@ -28,11 +28,11 @@ export const authService = {
recaptchaToken
});
setAuthToken(response.data.token, false);
// Token is now handled by GalleryAuthContext with slug-specific storage
return response.data;
},
galleryLogout() {
clearAuthToken(false);
// Logout is now handled by GalleryAuthContext
},
};