test
parent
3005000a77
commit
c0132f906c
|
@ -70,7 +70,6 @@ passport.use(
|
||||||
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
||||||
],
|
],
|
||||||
skipUserProfile: true, // this is important, if not set to true, an error will be thrown
|
skipUserProfile: true, // this is important, if not set to true, an error will be thrown
|
||||||
state: true,
|
|
||||||
},
|
},
|
||||||
(accessToken, refreshToken, profile, cb) => {
|
(accessToken, refreshToken, profile, cb) => {
|
||||||
console.log("accessToken", accessToken);
|
console.log("accessToken", accessToken);
|
||||||
|
|
|
@ -20,10 +20,18 @@ router.get(
|
||||||
"/auth/google/callback",
|
"/auth/google/callback",
|
||||||
passport.authenticate(
|
passport.authenticate(
|
||||||
"google",
|
"google",
|
||||||
passport.authenticate("google", {
|
passport.authenticate(
|
||||||
successReturnToOrRedirect: "/",
|
"google",
|
||||||
failureRedirect: "/login",
|
{
|
||||||
})
|
successReturnToOrRedirect: "/",
|
||||||
|
failureRedirect: "/login",
|
||||||
|
},
|
||||||
|
(err, user, info) => {
|
||||||
|
logger.info("err", err);
|
||||||
|
logger.info("user", user);
|
||||||
|
logger.info("info", info);
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue