Open wclr opened 12 years ago
+1 for external authentications using embedded relation using mongoid/mongodb :)
Is it possible to find user by his embedded documents in MongoDB? I mean, if Twitter authentication is embedded, can I find user doing something like User.where("authentications.provider = 'twitter' and authentications.user_id = 'xxx')
? If so, then it will be good idea. We're going to extract adapters for 1.0 release and maybe we'll be able to do it then.
Ok, I've checked it, it's possible, it looks pretty esy to implement, I actually like the idea. The only problem is that it requires migrating data and changing models. Maybe we could do it for 1.0 release. @kirs, what do you think?
I'm not that good with Mongo, but the proposal looks interesting.
Didn't you think when using MongoDB to allow external authentications to be an embedded collection in a User collection object, not a separate collection with references?