mongodb-memory-server-core
    Preparing search index...

    Interface AutomaticAuth

    interface AutomaticAuth {
        customRootName?: string;
        customRootPwd?: string;
        enable?: boolean;
        extraUsers?: CreateUser[];
        force?: boolean;
        keyfileContent?: string;
    }
    Index

    Properties

    customRootName?: string

    mongodb-memory-server automatically creates a root user (with "root" role)

    'mongodb-memory-server-root'
    
    customRootPwd?: string

    mongodb-memory-server automatically creates a root user with this password

    'rootuser'
    
    enable?: boolean

    Enable Automatic User creation

    false
    
    extraUsers?: CreateUser[]

    Extra Users to create besides the root user

    []
    
    force?: boolean

    Force to run "createAuth"

    false "createAuth" is normally only run when the given "dbPath" is empty (no files)
    
    keyfileContent?: string

    Custom Keyfile content to use (only has an effect in replset's) Note: This is not secure, this is for test environments only!

    "0123456789"