[FIX] Use New Cairo System
Some checks failed
Deploy USW-MC / deploy-edge (push) Failing after 2s
Deploy Edge Proxy / deploy-edge (push) Failing after 2s
S3 Repo Backup / s3-repo-backup (push) Failing after 5s

This commit is contained in:
Dunemask 2024-08-24 16:41:52 -06:00
parent 6eed3fd694
commit 8c7e41b21b
4 changed files with 12 additions and 9 deletions

View file

@ -2,11 +2,14 @@ import { Router } from "express";
import cairoAuthMiddleware from "./middlewares/auth-middleware.js";
const router = Router();
const cairoProjectId = process.env.MCL_CAIRO_PROJECT;
if(!cairoProjectId) throw Error("Cairo Project Required!");
const ok = (_r, res) => res.sendStatus(200);
function cairoRedirect(req, res) {
res.redirect(
`${process.env.MCL_CAIRO_URL}/cairo/auth?redirectUri=${req.query.redirectUri}`,
`${process.env.MCL_CAIRO_URL}/cairo/authenticate?redirectUri=${req.query.redirectUri}&projectId=${cairoProjectId}`,
);
}