-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Accounts integration done for mongo users #6
Conversation
@mizzao what do you think? |
Hi @kbdaitch this looks quite comprehensive; give me some time to review it. It's probably about time I also took a look at the ShareJS API and thought about the right way to do things. Did you mention you modified the documents demo to use this as well? I just got done modifying the library to download and serve CDN files over Meteor directly rather than having the client do it, so I'll need to merge your changes in. |
Hi @mizzao. Yes, I did use the documents demo in forming my app. Yeah, it would be great to have the assets come from CDN. Let me know how it goes. |
Any updates on this, @mizzao ? Did you get a chance to try it out, or look at the code? |
Hey @kbdaitch, I've been busy but will try and review and merge this over the next few days. I need to keep track of user ids in my docs as well, so we will make sure this is done right. :) Your changes look quite comprehensive. However, maybe we can have a Skype call or something to discuss them so you can explain what you did. I'm not sure about the owner vs invited-users authentication model as a default, as that doesn't really fit my use case. Let's talk about it. |
Sending |
A skype call can be great. We can decide on time. Wait a minute, you just merged it? |
Publications can be a way to secure user ids. Something like this with additional constraints and removing autopublish should do it. |
Hi @kbdaitch, I merged your code and did some cleanup to simplify things. Please note the slightly different structure of the config file and reorganization of the auth class. Since it doesn't make sense to support something other than Mongo right now, I also took out some of the extra logic for that. Maybe see if the updates still work with your documents-users. (We should probably work out some tests at some point.) I spent some time trying to see if I could store the Meteor I'm fine with using the Haha - your message popped up just as I was writing this one. |
Hi @mizzao, yes, it still works with my documents-demo. I would definitely love to add tests when the opportunity presents itself. Keep me in loop when you get to that. Thanks for the merge. Hopefully this feature helps someone. |
@kbdaitch note the change in configuration structure, if you were using that. Never mind...I guess your app doesn't do that. How did you test the authentication stuff? |
Thanks for your note, but what exactly changed, is it the added fields: {
"db": {
"type": "mongo",
"opsCollectionPerDoc": false
}
} Its pretty easy to test the authentication stuff with my documents demo. Just checkout the master of meteor-sharejs one directory outside relative to the demo checkout (just like you do with your demo app). The settings.json that is currently checked in has authentication/authorization enabled. Run the demo with With the current setup:
In the browser console:
|
@kbdaitch I was confused about which repo it was, I thought it was https://github.com/kbdaitch/meteor-documents-demo but it appears to be something else that I don't see as a public repo. I'm surprised that your app works because I changed the keys of the config and also removed the Thanks! |
@mizzao thanks for bringing this up. My bad, even though I was trying to test against upstream/master, I forgot to run with mrt meaning I was using the cached version of meteor-sharejs, which didn't have your changes. I just ran against upstream with the updated settings schema (without Thanks much! |
It just occurred to me that an alternative way to test authentication in chrome devtools JS console is:
This would show |
I was able to modularize all of the code to decouple client and server code. Feel free to critique.
Thanks.