Node.js/Express-Server als Ersatz für Cloudflare Pages Functions + D1 (läuft auf eigenem Server statt Cloudflare)
Build & Deploy / deploy (push) Waiting to run

This commit is contained in:
qcigano
2026-08-05 15:06:17 +02:00
parent 53e7bb158a
commit b8b8ec7b7a
19 changed files with 1322 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
/* =====================================================================
routes/auth.js — OAuth-Start/Callback für Google + PayPal-Login. 1:1 portiert aus
functions/api/auth/google/{start,callback}.js + functions/api/auth/paypal/{start,callback}.js
(beide Anbieter nutzen dieselbe gemeinsame Logik, siehe lib/oauth-handlers.js).
===================================================================== */
import { Router } from "express";
import { starteOAuth, verarbeiteOAuthCallback } from "../lib/oauth-handlers.js";
export const authRouter = Router();
authRouter.get("/api/auth/google/start", (req, res) => starteOAuth(req, res, "google"));
authRouter.get("/api/auth/google/callback", (req, res) => verarbeiteOAuthCallback(req, res, "google"));
authRouter.get("/api/auth/paypal/start", (req, res) => starteOAuth(req, res, "paypal"));
authRouter.get("/api/auth/paypal/callback", (req, res) => verarbeiteOAuthCallback(req, res, "paypal"));