|
|
@@ -5,7 +5,6 @@ module.exports = function(crowi, app) {
|
|
|
, logger = require('@alias/logger')('growi:routes:login-passport')
|
|
|
, passport = require('passport')
|
|
|
, config = crowi.getConfig()
|
|
|
- , Config = crowi.model('Config')
|
|
|
, ExternalAccount = crowi.model('ExternalAccount')
|
|
|
, passportService = crowi.passportService
|
|
|
;
|
|
|
@@ -428,8 +427,8 @@ module.exports = function(crowi, app) {
|
|
|
|
|
|
const getOrCreateUser = async(req, res, userInfo, providerId) => {
|
|
|
// get option
|
|
|
- const isSameUsernameTreatedAsIdenticalUser = Config.isSameUsernameTreatedAsIdenticalUser(config, providerId);
|
|
|
- const isSameEmailTreatedAsIdenticalUser = Config.isSameEmailTreatedAsIdenticalUser(config, providerId);
|
|
|
+ const isSameUsernameTreatedAsIdenticalUser = crowi.passportService.isSameUsernameTreatedAsIdenticalUser(config, providerId);
|
|
|
+ const isSameEmailTreatedAsIdenticalUser = crowi.passportService.isSameEmailTreatedAsIdenticalUser(config, providerId);
|
|
|
try {
|
|
|
// find or register(create) user
|
|
|
const externalAccount = await ExternalAccount.findOrRegister(
|