chore: further disabling of local auth strategy

This commit is contained in:
James
2022-07-09 12:04:21 -07:00
parent 4b2bc36f89
commit c8be171f24
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ export default function registerCollections(ctx: Payload): void {
const schema = buildCollectionSchema(formattedCollection, ctx.config);
if (collection.auth) {
if (collection.auth && !collection.auth.disableLocalStrategy) {
schema.plugin(passportLocalMongoose, {
usernameField: 'email',
});

View File

@@ -164,7 +164,7 @@ async function create(incomingArgs: Arguments): Promise<Document> {
let doc;
if (collectionConfig.auth) {
if (collectionConfig.auth && !collectionConfig.auth.disableLocalStrategy) {
if (data.email) {
resultWithLocales.email = (data.email as string).toLowerCase();
}