Implement login page proxy and CAPTCHA handling in MyTischtennisClient and Controller. Enhance login process with CAPTCHA token extraction and error handling. Update frontend to support iframe-based login and improve user experience with loading indicators.

This commit is contained in:
Torsten Schulz (local)
2025-11-23 15:18:53 +01:00
parent b74cb30cf6
commit f7a799ea7f
15 changed files with 702 additions and 284 deletions

View File

@@ -6,7 +6,17 @@ import { authorize } from '../middleware/authorizationMiddleware.js';
const router = express.Router();
// All routes require authentication
// Login-Page und Login-Submit müssen VOR authenticate stehen, da iframe keinen Token mitsenden kann
// GET /api/mytischtennis/login-page - Proxy für Login-Seite (für iframe)
router.get('/login-page', myTischtennisController.getLoginPage);
// POST /api/mytischtennis/login-submit - Proxy für Login-Form-Submission
router.post('/login-submit', myTischtennisController.submitLogin);
// POST /api/mytischtennis/extract-session - Extrahiere Session nach Login im iframe
router.post('/extract-session', myTischtennisController.extractSession);
// All other routes require authentication
router.use(authenticate);
// GET /api/mytischtennis/account - Get account (alle dürfen lesen)