Meteor.loginAsAdmin = function (password, callback) { // Create a login request with admin:true, so our loginHandler can handle it. let loginRequest = { admin: true, password: password }; Meteor._debug('Client loginAsAdmin'); // Send the login request. Accounts.callLoginMethod({ methodArguments: [loginRequest], userCallback: callback }); };