trying to port web app starter from PHP

This commit is contained in:
udo
2026-04-19 09:38:23 +00:00
parent 46d98a092f
commit be514d63d6
546 changed files with 76910 additions and 2807 deletions
@@ -0,0 +1,21 @@
<?php
// Simple endpoint to store OAuth session data
// This allows the frontend to communicate the OAuth service to the backend
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$input = json_decode(file_get_contents('php://input'), true);
if ($input && isset($input['oauth_service']) && isset($input['oauth_state'])) {
$_SESSION['oauth_service'] = $input['oauth_service'];
$_SESSION['oauth_state'] = $input['oauth_state'];
echo json_encode(['status' => 'success']);
} else {
http_response_code(400);
echo json_encode(['status' => 'error', 'message' => 'Invalid input']);
}
} else {
http_response_code(405);
echo json_encode(['status' => 'error', 'message' => 'Method not allowed']);
}