mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 02:16:03 +00:00
lower email when login using local provider
This commit is contained in:
parent
412a834f98
commit
6ba4ce561f
@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const { toLower } = require('lodash/fp');
|
||||
const { Strategy: LocalStrategy } = require('passport-local');
|
||||
|
||||
const createLocalStrategy = strapi => {
|
||||
@ -11,7 +12,7 @@ const createLocalStrategy = strapi => {
|
||||
},
|
||||
(email, password, done) => {
|
||||
return strapi.admin.services.auth
|
||||
.checkCredentials({ email, password })
|
||||
.checkCredentials({ email: toLower(email), password })
|
||||
.then(([error, user, message]) => done(error, user, message))
|
||||
.catch(error => done(error));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user