Channel with Guest access is not replicating to couchbase lite (clients)


#1

we are making an application where we are having public group as well as private group, any user in our application can read content of public group, To achieve this we are giving Guest access to channel(public group) as mentioned in the documentation.
http://developer.couchbase.com/documentation/mobile/1.1.0/develop/guides/sync-gateway/channels/developing/index.html

following is the code taken from my sync function which gives GUEST access to the channel, I have verified through the admin console that this channel is having guest access.
if(doc.groupType==‘public’){
access(“GUEST”,“ch-”+doc.channel_id);
}
But i unable to see this on our couchbase lite(client devices), Can somebody please help me to know that is this the right way to achieve this ? If yes then what is going wrong in my case ?


#2

Problem solved!!, I figured out that i was using pull replication using existing user, so it was pulling the channel where existing user has access not pulling for the guest user


#3

Glad you solved the issue. I recently published a screencast about the public channel that my be relevant as well http://blog.couchbase.com/2015/november/exploring-the-public-and-user-channels-in-couchbase-sync-gateway

James


#4

How do you fetch data from guest channel? Just removing authenticator works?


#5

Every user has access to the public channel (noted !) as well as the guest user (unauthenticated users).

James