couchbase iOS auth not work

43 views
Skip to first unread message

peng liu

unread,
Nov 21, 2014, 4:15:07 AM11/21/14
to mobile-c...@googlegroups.com
I have download the demo here :https://github.com/couchbaselabs/TodoLite-iOS
and then i found that . i can sync my local data with basicAuth ,even the user and pwd is wrong ,such as "userid: test ,pwd:"test-pwd"" , it will also sync local data to my server.
so ,how to fix it ???
By the way ,i have another question. i have a create new user api on my old server api. and in this new project . i want  to auto  create a couchbase "channels"(such as "C-uuid")  when user login/register. and then if user sync local data, it will push to these "channels".
I mean every user will have own couchbase channel.  how to do that ? at this time . sync auth not work now. so anybody can help me ?
Thanks

ajres

unread,
Nov 21, 2014, 4:23:33 AM11/21/14
to mobile-c...@googlegroups.com
I'm going to assume that you are using Sync Gateway on the server side.

In which case you need to disable 'admin party' mode and force the use of credentials, to do this disable the GUEST account for your database in the configuration.json file that you are using when starting sync_gateway.

e.g.

"db": {
"server": "walrus:data",
    "sync": `
    function(doc){
        channel(doc.channels);
    }`,
    "users": {
        "GUEST": {"disabled": true}
    }
}

Andy
Reply all
Reply to author
Forward
0 new messages