mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
Add support of google signin
This commit is contained in:
parent
900141daff
commit
6405bb5056
10 changed files with 47 additions and 8 deletions
|
@ -6,6 +6,7 @@ var TwitterStrategy = require('passport-twitter').Strategy;
|
|||
var GithubStrategy = require('passport-github').Strategy;
|
||||
var GitlabStrategy = require('passport-gitlab2').Strategy;
|
||||
var DropboxStrategy = require('passport-dropbox-oauth2').Strategy;
|
||||
var GoogleStrategy = require('passport-google-oauth20').Strategy;
|
||||
|
||||
//core
|
||||
var config = require('./config.js');
|
||||
|
@ -100,4 +101,12 @@ if (config.dropbox) {
|
|||
clientSecret: config.dropbox.clientSecret,
|
||||
callbackURL: config.serverurl + '/auth/dropbox/callback'
|
||||
}, callback));
|
||||
}
|
||||
//google
|
||||
if (config.google) {
|
||||
passport.use(new GoogleStrategy({
|
||||
clientID: config.google.clientID,
|
||||
clientSecret: config.google.clientSecret,
|
||||
callbackURL: config.serverurl + '/auth/google/callback'
|
||||
}, callback));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue