test
parent
d77ef338c9
commit
8cfaa0e8d6
|
@ -57,6 +57,8 @@ app.use(
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
app.use(passport.authenticate("session"));
|
||||||
|
|
||||||
passport.use(
|
passport.use(
|
||||||
new GoogleStrategy.Strategy(
|
new GoogleStrategy.Strategy(
|
||||||
{
|
{
|
||||||
|
@ -68,6 +70,7 @@ 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);
|
||||||
|
|
|
@ -9,7 +9,6 @@ router.get(
|
||||||
"/auth/google",
|
"/auth/google",
|
||||||
passport.authenticate("google", {
|
passport.authenticate("google", {
|
||||||
accessType: "offline",
|
accessType: "offline",
|
||||||
session: false,
|
|
||||||
scope: [
|
scope: [
|
||||||
"https://www.googleapis.com/auth/calendar.app.created",
|
"https://www.googleapis.com/auth/calendar.app.created",
|
||||||
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
"https://www.googleapis.com/auth/calendar.events.freebusy",
|
||||||
|
|
Loading…
Reference in New Issue