Thanks Jens, we just verified and can confirm that its using the previous session details…
Do you have any idea when this custom cookie storage will make it into the release? Next one? https://github.com/couchbase/sync_gateway/issues/758 filed… Thanks Christoph From: Jens Alfke Reply-To: "[email protected]<mailto:[email protected]>" Date: Thursday, March 26, 2015 at 9:12 AM To: "[email protected]<mailto:[email protected]>" Subject: Re: Authentication issues with Facebook session On Mar 26, 2015, at 8:36 AM, Christoph Berlin <[email protected]<mailto:[email protected]>> wrote: 1) User logs in via Facebook and uses the Token based authenticator to authenticate with the sync gateway. 2) User logs out and logs in with a basic HTTP authenticator Problem: even though the authenticator is correctly configured and the logic is sound, the first authentication attempt happens under the old Facebook user and hence the replication is messed up. It sounds like the Gateway session cookie is still being sent and is overriding the basic-auth credentials. (You can verify this by sniffing the HTTP traffic using something like Charles.) I would think that the Gateway would check basic auth first, but I haven’t looked at that code in a long time. I suggest filing a bug against the Gateway. We then suspected that the CBLManager might be the root cause as this is the only process that doesn't get deallocated. I don’t think so. The CBLManager has nothing to do with replication. It makes sense for the replicator to clear session-related cookies when it’s using basic auth. The problem with that has been that the cookie store (NSHTTPCookieStorage) is a global shared by the entire app, so if one replicator did this it could destroy state used by another replicator. Pasin recently implemented<https://github.com/couchbase/couchbase-lite-ios/issues/543> a custom per-replicator cookie store that should fix this. —Jens -- You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/yMvUxXM4Ncg/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/FB051F0A-0480-4D2E-B95F-59AC1CBEA190%40couchbase.com<https://groups.google.com/d/msgid/mobile-couchbase/FB051F0A-0480-4D2E-B95F-59AC1CBEA190%40couchbase.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/A74E58A6-152C-43DD-9259-74BFAA03F17B%40christophberlin.com. For more options, visit https://groups.google.com/d/optout.
