From 992affae4553d8ba7cc8ce42680ccb4f7f92422c Mon Sep 17 00:00:00 2001 From: Yannick Bungers Date: Mon, 13 Apr 2020 13:52:44 +0200 Subject: [PATCH] fixed google Signed-off-by: Yannick Bungers Signed-off-by: David Mehren --- lib/web/auth/google/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/web/auth/google/index.ts b/lib/web/auth/google/index.ts index 7962da64d..21fd39b5c 100644 --- a/lib/web/auth/google/index.ts +++ b/lib/web/auth/google/index.ts @@ -1,7 +1,7 @@ import { Router } from 'express' import { AuthMiddleware } from '../interface' import passport from 'passport' -import * as GoogleStrategy from 'passport-google-oauth20' +import * as Google from 'passport-google-oauth20' import {config} from '../../../config' import { passportGeneralCallback } from '../utils' @@ -9,7 +9,7 @@ const googleAuth = Router() export const GoogleMiddleware: AuthMiddleware = { getMiddleware (): Router { - passport.use(new GoogleStrategy({ + passport.use(new Google.Strategy({ clientID: config.google.clientID, clientSecret: config.google.clientSecret, callbackURL: config.serverURL + '/auth/google/callback', @@ -17,7 +17,7 @@ export const GoogleMiddleware: AuthMiddleware = { }, passportGeneralCallback)) googleAuth.get('/auth/google', function (req, res, next) { - const authOpts: GoogleStrategy.AuthtenticateOptionsGoogle = { scope: ['profile'], hostedDomain: config.google.hostedDomain } + const authOpts = { scope: ['profile'], hostedDomain: config.google.hostedDomain } passport.authenticate('google', authOpts)(req, res, next) }) googleAuth.get('/auth/google/callback',