login-callback
This commit is contained in:
parent
ffb8dd5a23
commit
f0038acb61
2 changed files with 20 additions and 0 deletions
|
@ -122,6 +122,7 @@ export function initAuth(router: express.Router) {
|
|||
"/auth/oauth-callback",
|
||||
passport.authenticate("oauth2", { failureRedirect: "/", session: false }),
|
||||
(req: Request, res: Response) => {
|
||||
res.clearCookie("redir");
|
||||
if (req.user && req.user.apiKey) {
|
||||
res.redirect(
|
||||
req.cookies.redir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue