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
Build & Deploy / deploy (push) Waiting to run
This commit is contained in:
@@ -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"));
|
||||
Reference in New Issue
Block a user