use NextFunction
This commit is contained in:
parent
6bbcfd011e
commit
2e5a76a102
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
import express, { Request, Response } from "express";
|
import express, { NextFunction, Request, Response } from "express";
|
||||||
import https from "https";
|
import https from "https";
|
||||||
import pick from "lodash.pick";
|
import pick from "lodash.pick";
|
||||||
import passport from "passport";
|
import passport from "passport";
|
||||||
|
@ -113,10 +113,10 @@ export function initAuth(router: express.Router) {
|
||||||
router.get("/auth/login", passport.authenticate("oauth2"));
|
router.get("/auth/login", passport.authenticate("oauth2"));
|
||||||
router.get(
|
router.get(
|
||||||
"/auth/new-login",
|
"/auth/new-login",
|
||||||
(req: Request, res: Response) => {
|
(req: Request, res: Response, next: NextFunction) => {
|
||||||
res.cookie("redir", `${env.DASHBOARD_URL}/new/login-callback/`, { httpOnly: true });
|
res.cookie("redir", `${env.DASHBOARD_URL}/new/login-callback/`, { httpOnly: true });
|
||||||
|
|
||||||
return res.sendStatus(200);
|
next();
|
||||||
},
|
},
|
||||||
passport.authenticate("oauth2"),
|
passport.authenticate("oauth2"),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue