mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 03:33:58 -05:00
Give google the correct name.
This commit is contained in:
parent
d1d6d5810b
commit
4ae8086301
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ var GoogleStrategy = require('passport-google-oauth20').Strategy
|
||||||
const config = require('../../../config')
|
const config = require('../../../config')
|
||||||
const {setReturnToFromReferer, passportGeneralCallback} = require('../utils')
|
const {setReturnToFromReferer, passportGeneralCallback} = require('../utils')
|
||||||
|
|
||||||
let facebookAuth = module.exports = Router()
|
let googleAuth = module.exports = Router()
|
||||||
|
|
||||||
passport.use(new GoogleStrategy({
|
passport.use(new GoogleStrategy({
|
||||||
clientID: config.google.clientID,
|
clientID: config.google.clientID,
|
||||||
|
@ -14,12 +14,12 @@ passport.use(new GoogleStrategy({
|
||||||
callbackURL: config.serverurl + '/auth/google/callback'
|
callbackURL: config.serverurl + '/auth/google/callback'
|
||||||
}, passportGeneralCallback))
|
}, passportGeneralCallback))
|
||||||
|
|
||||||
facebookAuth.get('/auth/google', function (req, res, next) {
|
googleAuth.get('/auth/google', function (req, res, next) {
|
||||||
setReturnToFromReferer(req)
|
setReturnToFromReferer(req)
|
||||||
passport.authenticate('google', { scope: ['profile'] })(req, res, next)
|
passport.authenticate('google', { scope: ['profile'] })(req, res, next)
|
||||||
})
|
})
|
||||||
// google auth callback
|
// google auth callback
|
||||||
facebookAuth.get('/auth/google/callback',
|
googleAuth.get('/auth/google/callback',
|
||||||
passport.authenticate('google', {
|
passport.authenticate('google', {
|
||||||
successReturnToOrRedirect: config.serverurl + '/',
|
successReturnToOrRedirect: config.serverurl + '/',
|
||||||
failureRedirect: config.serverurl + '/'
|
failureRedirect: config.serverurl + '/'
|
||||||
|
|
Loading…
Reference in a new issue