I am attempting to re-authenticate a push replication when an “Unauthorized” HttpException is available in the replication changed event arguments.
It appears that simply resetting the cookie by calling
Replication.SetCookie does not re-authenticate the replication. I also tried to remove the previous cookie and then call SetCookie again, which also does not work. This continues to produce unauthorized exceptions.
If I stop the replication, create a brand new instance and then start it again, it seems to work.
However, about 95% of the time when I do this, the replication will then immediately fail with a document conflict when it tries to push up a revision that it tried to push previously but couldn’t due to being unauthorized.
I can send the full output and sequence of events that CBL is logging if that would be helpful. Also, not sure if I should post this to the public forum or if its ok message you directly.