apache / couchdb-nano

Nano: The official Apache CouchDB library for Node.js
https://www.npmjs.com/package/nano
Apache License 2.0
653 stars 165 forks source link

fix cookie handling bug #320

Closed glynnbird closed 1 year ago

glynnbird commented 1 year ago

Overview

In issue https://github.com/apache/couchdb-nano/issues/174#issuecomment-1378427726 it was pointed out that cookie authentication seemed to be broken. I checked and it seemed to be the case.

I updated the dependencies and checked the implementation of Axios's cookie handling.

This problem is now fixed so you can do:

const Nano = require('nano')
const nano = Nano('http://127.0.0.1:5984')

const main = async () => {
  await nano.auth('myusername', 'mypassword')
  const r = await nano.db.list()
}
main()

Testing recommendations

Checklist