couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: Error when trying to create a session
Date Mon, 22 Mar 2010 21:57:44 GMT

On Mar 22, 2010, at 2:43 PM, Lena Herrmann wrote:

> Hi,
> 
> I still have the same problem. Now I ran out of things to try.
> 
> Here is the code: http://gist.github.com/340562
> 

Looking at this I'm seeing that roles needs to be an array.

Can you show the output of prepareUserDoc()?

Maybe something is going wrong with eg hex_sha1 or newUuids()

Chris

> When trying to login, I still get a 404 with reason "Name or password is incorrect."
> 
> Can someone try if this runs on their machine? Or am I missing something very stupid?
> 
> Lena
> 
> 
> 
> 
> Am 17.03.10 20:15, schrieb Lena Herrmann:
>> Am 17.03.10 18:39, schrieb J Chris Anderson:
>>> 
>>> On Mar 17, 2010, at 9:28 AM, Lena Herrmann wrote:
>>> 
>>>> Hi,
>>>> 
>>>> my code:
>>>> 
>>>> var userDoc = CouchDB.prepareUserDoc({
>>>> name: "Gaius Baltar"
>>>> }, "secret");
>>>> db.save(userDoc);
>>>> CouchDB.login("Gaius Baltar", "secret");
>>>> 
>>>> Why does the last line get me a 401 Unauthorized?
>>>> 
>>>> According to the cookie_auth.js test, it should work like this. Am I
>>>> missing something?
>>> 
>>> Does it help to call _ensure_full_commit after the userDoc is saved?
>>> 
>> 
>> Tried it, no it doesn't ...
>> 
>> Lena
>> 
>> 
>> 
>> 
>> 
> 


Mime
View raw message