main
alex 2024-01-14 13:34:33 +01:00
parent 91b690770b
commit 8a405f293c
1 changed files with 8 additions and 7 deletions

View File

@ -9,6 +9,7 @@ router.get(
"/auth/google",
passport.authenticate("google", {
accessType: "offline",
scope: [
"https://www.googleapis.com/auth/calendar.app.created",
"https://www.googleapis.com/auth/calendar.events.freebusy",
@ -19,19 +20,19 @@ router.get(
router.get(
"/auth/google/callback",
passport.authenticate("google", {
failureRedirect:
/* "https://customerdashboard.ex.umbach.dev/store/calendar/failed" */ "/login",
successReturnToOrRedirect: "/testhere",
accessType: "offline",
failureRedirect: "/login",
successRedirect: "/test",
session: false,
}),
function (req, res) {
// Successful authentication, redirect home.
console.log("req.user", req.user);
logger.info("req.user", req.user);
res.redirect(
/* "https://customerdashboard.ex.umbach.dev/store/calendar/finish" */ "/test"
);
res.redirect("/test");
}
);
export default router;
/* "https://customerdashboard.ex.umbach.dev/store/calendar/failed" */
/* "https://customerdashboard.ex.umbach.dev/store/calendar/finish" */