diff --git a/AppImage/components/auth-setup.tsx b/AppImage/components/auth-setup.tsx index 672cf11..e2915d4 100644 --- a/AppImage/components/auth-setup.tsx +++ b/AppImage/components/auth-setup.tsx @@ -61,8 +61,13 @@ export function AuthSetup({ onComplete }: AuthSetupProps) { throw new Error(data.error || "Failed to skip authentication") } + if (data.auth_declined) { + console.log("[v0] Authentication skipped successfully - APIs should be accessible without token") + } + console.log("[v0] Authentication skipped successfully") localStorage.setItem("proxmenux-auth-declined", "true") + localStorage.removeItem("proxmenux-auth-token") // Remove any old token setOpen(false) onComplete() } catch (err) { diff --git a/AppImage/scripts/flask_auth_routes.py b/AppImage/scripts/flask_auth_routes.py index 00f4f5f..25677dc 100644 --- a/AppImage/scripts/flask_auth_routes.py +++ b/AppImage/scripts/flask_auth_routes.py @@ -135,7 +135,12 @@ def auth_skip(): success, message = auth_manager.decline_auth() if success: - return jsonify({"success": True, "message": message}) + # Return success with clear indication that APIs should be accessible + return jsonify({ + "success": True, + "message": message, + "auth_declined": True # Add explicit flag for frontend + }) else: return jsonify({"success": False, "message": message}), 400 except Exception as e: