aboutsummaryrefslogtreecommitdiff
path: root/src/server/authentication
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-09-01 14:03:32 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-09-01 14:03:32 -0400
commit5e12b7d816f1778af112ce69f3029e2f4a72bb08 (patch)
tree5700c5eab4bed2f1e69462a460aebe0dd0ad4e7a /src/server/authentication
parent77e08a4362ba8fab4cab361fcb472702c97edf15 (diff)
authentication working
Diffstat (limited to 'src/server/authentication')
-rw-r--r--src/server/authentication/config/passport.ts13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/server/authentication/config/passport.ts b/src/server/authentication/config/passport.ts
index 97ded8785..6e0e01b9e 100644
--- a/src/server/authentication/config/passport.ts
+++ b/src/server/authentication/config/passport.ts
@@ -5,7 +5,6 @@ import { default as User } from '../models/user_model';
import { Request, Response, NextFunction } from "express";
import { RouteStore } from '../../RouteStore';
import * as GoogleOAuth from "passport-google-oauth20";
-const config = require("../../credentials/google_photos_credentials");
const LocalStrategy = passportLocal.Strategy;
const GoogleOAuthStrategy = GoogleOAuth.Strategy;
@@ -34,18 +33,6 @@ passport.use(new LocalStrategy({ usernameField: 'email', passReqToCallback: true
});
}));
-
-passport.use(new GoogleOAuthStrategy(
- {
- clientID: config.oAuthClientID,
- clientSecret: config.oAuthclientSecret,
- callbackURL: config.oAuthCallbackUrl,
- // Set the correct profile URL that does not require any additional APIs
- userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo'
- },
- (token, refreshToken, profile, done) => done(undefined, { profile, token })
-));
-
export let isAuthenticated = (req: Request, res: Response, next: NextFunction) => {
if (req.isAuthenticated()) {
return next();