[FIX] Use New Cairo System
This commit is contained in:
parent
6eed3fd694
commit
8c7e41b21b
4 changed files with 12 additions and 9 deletions
|
@ -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}`,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue