<commit_before>'use strict';

import passport from 'passport';
import mongoose from 'mongoose';

const LocalStrategy = passport.Strategy;
const User = mongoose.model('User');

/**
 * Configurate passport for account authentication.
 *
 * @author <NAME>
 * @module Konko/Server/Configurations/Passport
 */
export default () => {
  passport.use(new LocalStrategy({
    usernameField: 'email',
  }, (email, password, done) => {<commit_msg>fixed where getting User model before it actually loaded<commit_after>'use strict';

import passport from 'passport';
import passportLocal from 'passport-local';
import mongoose from 'mongoose';

const LocalStrategy = passportLocal.Strategy;

/**
 * Configurate passport for account authentication.
 *
 * @author <NAME>
 * @module Konko/Server/Configurations/Passport
 */
export default () => {
  const User = mongoose.model('User');
  passport.use(new LocalStrategy({
    usernameField: 'email',
  }, (email, password, done) => {
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.0, 'mean_word_length': 5.04375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '220731', 'n_tokens_mistral': 279, 'n_tokens_neox': 275, 'n_words': 80}