I am having my own authentication logic and using accounts-base package so that basic user logging handling etc is done by the package.
Previously I was using accounts-password & customized accounts-ui-unstyled.
I has first removed accounts-password so that I can use some thing like:
Accounts.callLoginMethod({
methodArguments: [{
username, password
}],
userCallback: callback
});
But the moment I remove accounts-ui-unstyled, I start landing in problems. First Accounts is undefined. I guess accounts-ui-unstyled package was making it available using:
api.imply(‘accounts-base’, [‘client’, ‘server’]);
Wherever Accounts is undefined, I have tried using
import { Accounts } from ‘meteor/accounts-base’;
But this does not solve the complete problem. It seems the Accounts is not initialized as it should be. Becuase when I am using:
Accounts._loginMethod(this,…
Method, this is undefined
Due to this I am unable to reset password or enroll users using ability of accounts-base package.
Any help to use accounts-base only correctly would be appreciated.