[FEATURE] Initial Cairo Auth Integration
This commit is contained in:
parent
edbfc2348a
commit
184f1fa631
10 changed files with 234 additions and 14 deletions
16
lib/routes/auth-route.js
Normal file
16
lib/routes/auth-route.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { Router } from "express";
|
||||
import cairoAuthMiddleware from "./middlewares/auth-middleware.js";
|
||||
const router = Router();
|
||||
|
||||
const ok = (_r, res) => res.sendStatus(200);
|
||||
|
||||
function cairoRedirect(req, res) {
|
||||
res.redirect(
|
||||
`${process.env.MCL_CAIRO_URL}/cairo/auth?redirectUri=${req.query.redirectUri}`,
|
||||
);
|
||||
}
|
||||
|
||||
router.get("/verify", cairoAuthMiddleware, ok);
|
||||
router.get("/redirect", cairoRedirect);
|
||||
|
||||
export default router;
|
Loading…
Add table
Add a link
Reference in a new issue