chore: further disabling of local auth strategy
This commit is contained in:
@@ -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',
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user