Session authentication cross domain

I am using custom authentication method for obtaining session. App server logs in user and returns session cookie to the ionic angular client.
My question is how can i use that session if my ionic client is not on same domain as sync gateways server.

It should just be a matter of setting the session cookie on your requests to the Sync Gateway server. There’s nothing domain-specific in the cookie itself, but you may need to set the cookie explicitly in your client (instead of having your app server return a SetCookie header).

@vladimirnani @adamf
I am having the similar issue. I am using pouchdb-authentication, which I am replacing with Auth0. The session cookie returned from the proxy nodejs app is not used by the pouchdb and the connection fails.

Any idea on how to resolve this !!