Set-cookie on two different database replications

Hi Folks,

http://developer.couchbase.com/documentation/mobile/current/develop/guides/sync-gateway/administering-sync-gateway/authenticating-users/index.html#custom--indirect--authentication

http://developer.couchbase.com/documentation/mobile/1.1.0/develop/guides/couchbase-lite/native-api/replication/index.html

Design:
Android Client side:
2 Databases and corresponding push and pull replications started and set cookie is set.
2 databases have different sessions.

Server:
Custom Digest auth is followed and 2 cookies for two different database are sent to client. Cookie names remain same i,e SyncGatewaySession but values different.

Problem:
After
1)Replications of DB1 is created,set cookie set and started.
2)Replications of DB2 is created,set cookie set and started.

The only DB2 replication is sending cookie to to server not the DB1 replication.Hence 401 for DB1 replication.

To be precise only cookie which is sent last is hold by httpcookiefactory.

Is the cookie same name the issue here? can we get the custom cookie name from Syncgateway?
Need more insight on the design and the usage/generation for cookie.

Thanks
Nithin

Hey @nitz_couchbase,

Thanks for the details and this is noted in our feature milestone where the replicators will have independent storage.

You can remove the “SyncGatewaySession” cookie or send a DELETE /dbname/_session request to the server.
The reference to the open issue can be found over at Github