The problem turned out to be an old version of the plugin, for some reason 
the command 'cordova plugin add com.couchbase.lite.phonegap' was (or is) 
installing an old version of the plugin 1.0.0-BETA which does not support 
the "headers" object which i actually had already tried to use. After 
changing to the newerr version with 'phonegap local plugin add 
https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin.git' it 
works fine.


On Monday, 10 November 2014 18:33:56 UTC, Jens Alfke wrote:
>
>
> On Nov 10, 2014, at 4:12 AM, João Agostinho <[email protected] 
> <javascript:>> wrote:
>
> im returning the session token to my phonegap app but i cant figure out 
> how to pass it to cblite
>
>
> The cleanest way is to configure your server so that the API endpoint you 
> use for your custom auth has the same hostname and port as the SG. (You'll 
> need to use some kind of proxy or URL rewriter to do that, like nginx or 
> Apache.) Then your custom auth endpoint can just return a Set-Cookie: 
> header with the session cookie, and the client will automatically start 
> using it for calls to the SG.
>
> If you can't configure the server that way, then on the client you can 
> explicitly force the replicator to send the cookie by adding a "Cookie" 
> property to a "headers" object in your replication config.
>
> —Jens
>

-- 
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/2b0ada0f-0856-4bee-9df0-a35cc3f37219%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to