redgeoff / slouch

A JS client for CouchDB that does the heavy lifting
MIT License
121 stars 24 forks source link

Can I ask you (redgeoff) a question? #162

Open zahachtah opened 11 months ago

zahachtah commented 11 months ago

Sorry, tried to find some means of contact but none found. I found slouch which could have been what I needed but it's not maintained as I see.

However, I really just have a very simple question that vexes me and I thought may be you could possibly want to share some knowledge regarding interacting with couchDB.

My issue is to have a webpage that is hosted on another domain and be able to log in and interact with several couchDB servers using cookie authentication. I have set the CORS to accept the domain of my webpage, and I have credentials: 'include' in the header but I still get unauthorised whatever I do. For example, I want to list _all_dbs. Making that call with basic authentication works. making it from curl works with cookies. Just from the browser it just won't. I have asked Jan on the couchDB slack channel and he suggests having the site on the same domain to not have to deal with the pest of CORS, but offered no solution to having it cross domains. It should be possible, I understand slouch could do this, and pouchDB can. so there is some trick that eludes me.

Any help at all would be very appreciated. Sorry for using an issue to communicate to you, I did not find any other contact channel!

cheers, Jon