Closed mariobriggs closed 9 years ago
@mariobriggs: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/
Yeah it's pretty awkward that there isn't a good way to configure the DB client for accounts - maybe we can do it based on the presence of a package? So you are only allowed to have one of accountsdb-postgres, accountsdb-mongo, etc, and then the accounts-base package detects which one it is using?
Going to take a look in more depth later, pretty swamped with 1.2 release. Thanks for the PR!
I just took another look and this actually looks really good!
hi Guys, first off thanks for this effort to use other backends for meteor-accounts.
1 - I have attempted to see if with some small changes, can make this pluggable to work with any supported backend db. I defined a variable (Meteor.AccountsDBClient)in accounts-base-pg-driver that is set to the interface class and then accounts-base uses that variable to instantiate the required class.
This currently requires that 'accounts-password-pg-driver' is defined before accounts-password in the app's packages (i tried to overcome this by having accounts-base-pg-driver 'use' accounts-base, but that causes circular dependencies)
p.s not claiming this is best or final, but wanted to make a start on your super effort and extend it to couchdb, since we had a few requests for this. So thanks to you.
2 - added methods in the 'AccountsDBClientPG' for moving out the 'observes' on users & users-services (setupObserves, stopObserves). Also add a few more methods (removeOtherHashedLoginTokens, expireResumeTokens, updatePassword) in the interface and ensured it is invoked via that from password-server.js and accounts-server.js
3- small fix to deleteAllResumeTokens and added the userId parameter, so can be used even when required to delete for a particular user