[FEATURE] Cairo Auth Integration
This commit is contained in:
parent
184f1fa631
commit
cdea22c08a
16 changed files with 89 additions and 45 deletions
|
@ -19,6 +19,7 @@ const cairoAuthHandler = (req, res, next) => {
|
|||
if (!req.token) return res.status(401).send("Cairo auth required!");
|
||||
VERB("AUTH", `${MCL_CAIRO_URL}/api/user/info`);
|
||||
cairoAuthenticate(req.token)
|
||||
.then((authData) => (req.cairoId = authData.id))
|
||||
.then(() => next())
|
||||
.catch((err) => {
|
||||
ERR("AUTH", err.response ? err.response.data : err.message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue