Open ccorcos opened 9 years ago
:+1: for CouchDB supported accounts packages :+1:
As the meteor folks are playing around with a sql backend as mentioned here - https://forums.meteor.com/t/apache-couchdb-support-released-in-atmosphere/8993/4 i think it is a good oppo to look at how the account modules can be neatly tweaked around to work with different backends. I havent yet looked at the accounts module and it might turn out that it is already designed that way, in which case great, but if not i think it will great to have the community users vote for such a feature
Well I'd love to integrate it with ccorcos:any-db
and my neo4j driver so let me know if you're able to spearhead this project ;)
looks like we are in luck - pushed https://github.com/mariobriggs/meteor-accounts-couchdb out just now. give it a try and let me know how goes
hmm. is there no api for this? it looks like you had to copy over most of the code :/
The accounts-base and accounts-password packages in the meteor-accounts-couchdb repo are a duplicate copy of what is in the 'meteor/postgres-packages' repo. I made a copy of those only for ease of use for the end-user at this point in time - so that for someone wanting to use couchDB accounts, there is only one repo to clone (you dont have to clone 'meteor/postgres-packages' also to get a part).
The thinking is that ultimately the changes in 'meteor/postgres-packages' s accounts-base and accounts-password, (for pluggability of which backend repo to use,) will get back into core meteor's accounts-password/account-base. At that point the accounts-password-couchdb/accounts-base-couchdb can be released as independent packages.
For the api question - The api for the end-user doesnt change, it is the same Accounts.createUser , Meteor.loginWithPassword etc. In the sample app in the meteor-accounts-couchdb repo, i have just used the accounts-ui package which calls those default meteor api's, rather than the app calling them.
hopefully this clears up i.e. the api of accounts-password-couchdb/accounts-base-couchdb is invoked by accounts-password/accounts-base package and not end-user
I guess my point is, what if I want to use some other database entirely. Or what if I want to use accounts-facebook. Is it possible at this point to plug in to the accounts-base package without copying it over wholesale?
use with accounts-facebook - The AccountsDBClientXXX interface/class has 2 method for this aspect (getUserByServiceIdAndName & setServiceData). So the answer is yes (however note that i have not tested that aspect and meteor postgres also doesnt claim to have tested, so might still have a few bugs)
plug-in without copying over - apart from a release of the modified accounts-base/password package by someone, not getting more brainy ideas :-)
Error when trying to add accounts-facebook package, I get the following error:
W20151103-17:20:17.901(11)? (STDERR)
W20151103-17:20:17.902(11)? (STDERR) /Users/Manny/.meteor/packages/meteor-tool/.1.1.9.qxcaxm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
W20151103-17:20:17.902(11)? (STDERR) throw(ex);
W20151103-17:20:17.902(11)? (STDERR) ^
W20151103-17:20:17.956(11)? (STDERR) Error: URL must be in the format mongodb://user:pass@host:port/dbname
W20151103-17:20:17.957(11)? (STDERR) at Error (
thanks. I guess i could use the LocalMarket app which uses the loginWithTwitter and would hit the same issue, or do u have a simpler sample/use-case to work with
Thanks for the quick reply, I am just trying out the https://github.com/mariobriggs/meteor-accounts-couchdb app I am building a new Meteor app and since its in initial stages I thought to give couchDb a go and see how it goes. Cheers!
Not sure why, but I am getting crazy slow response time with Cloudant. Just created an account and took it for a spin. I type the username and password and hit the login button and it takes anywhere between 15-23 secs to login.
Here is a screencast :
I have seen this slow response times on and off myself during dev with both Cloudant and PostgresSQL (was using a ElephantSQL service instance). Other times it has been fast enough, so the only conclusion i could come too was network slowness during some periods. I cross checked now and on my version, seems ok - http://simple-todos-mariobriggs-1938.mybluemix.net/
True, thanks for the input mate
Cheers!
It would be awesome to use account-base and accounts-password with CouchDb now too, entirely removing the mongo dependency!