-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.js
More file actions
20 lines (20 loc) · 712 Bytes
/
Copy pathauth.js
File metadata and controls
20 lines (20 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
module.exports = (passport) => {
passport.serializeUser((user, done) => {
done(null, user);
});
passport.deserializeUser((user, done) => {
done(null, user);
});
passport.use(new GoogleStrategy({
clientID: "934708699046-86kkmhr565r3hibv1f7ea67sa9q3d9a3.apps.googleusercontent.com",
clientSecret: "NhkQeR59NIFbZFIvZiD1cTAs",
callbackURL: "http://localhost:8080/auth/google/callback"
},
(token, refreshToken, profile, done) => {
return done(null, {
profile: profile,
token: token
});
}));
};