I'm calling the following code:
$.couch.login($.extend({ name: "harry", password: "secrets"}, callback));
$.couch.session(callback);
where "harry" is just a dummy user I created using $.couch.signup
and callback
is a simple object specifying success/error/complete functions with bodies like these:
success: function (data) {
console.log('Success');
console.log(data);
}
This code returns the following:
Success
Object {ok: true, name: "harry", roles: Array[0]}
Success
Object {ok: true, userCtx: Object, info: Object}
The first return is fine, but the second, the one from session
, the userCtx
object is basically empty, with a null
name.
Also, when I try to login using my personal username and password (the ones I use as a Futon admin), this is returned:
Success
Object {ok: true, name: null, roles: Array[1]}
(0: "_admin")
Success
Object {ok: true, userCtx: Object, info: Object}
and fascinatingly, the first request knows seems to know I'm an admin, but doesn't get any other data, and the second request does the same thing as the previous example.
Any thoughts? Am I not using $.couch.session
correctly? Is there something wrong with my couch instance?
FYI I am using version 1.4.0 and built from source.