-
Notifications
You must be signed in to change notification settings - Fork 22
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
db.users.drop() causes trouble #20
Comments
Hit me up with a PR if you can think of a work around, or any suggestions On Mon, Feb 18, 2013 at 6:30 PM, Ilkka Huotari [email protected]:
|
Not sure, but should it just do a model.fetch around that point (line 64)? Of course an extra model.fetch feels bad though... In the app code there will probably be this: ... would it be wise to do that at the derby-auth level already? Just some ideas, I really don't know what's best here.. |
Here's one way to do it (maybe): ile@5207118 (A bit too much code got in. I'm also making hooks for users_public collection because I think that's what I need... By querying users_public I get a hash array and not a normal array like with motifs .... so maybe a PR isn't a good idea with this commit) You can decide what to do with this, copy & paste or improve or anything. |
db.users.drop() seems to cause problems - the code (derby-auth) assumes that everything is ok when the
sess.userId
is set, but actually the database can be empty, which isn't noticed that that point (https://github.com/lefnire/derby-auth/blob/master/index.js#L64), and it will lead to problems afterwards.The client has to have a cookie set in order the sess.userId to be set (of course).
The text was updated successfully, but these errors were encountered: