-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db.login() Not Working as Intended #127
Comments
Which version of CouchDB are you using? It's best to use 1.6.1 or later. |
Hey there! @nolanlawson thanks for the reply. I'm using CouchDB 2 but I'm not sure if that would be the issue considering db.signup() works just fine. I'm using Express body-parser to get the username and password data from my form but I did read that this is strictly a browser thing and not to be used in Node. I could try an older version of CouchDB if you think that could be the issue though. |
TBH I haven’t run the test suite against CouchDB 2.0 so I’m not 100% sure if it works. Ideally though this library should support both 1.x and 2.x.
|
I think this might help. |
@nolanlawson Got the same problem with the login... running on cloudant and in my node server! When signing-up a new user, it works but I'm getting @koofah your link doesn't work! |
@nolanlawson just read it's not supposed to work on Node.js why is that? Anything that is not supposed to work on Node.js is used? |
I didn't intend it to work in Node.js; this library is designed to be a simple interface to CouchDB authentication. Maybe it works in Node, but I doubt it. As for Cloudant, I haven't tested it. |
@nolanlawson I'm a bit lost then...how are we supposed to design a user creation platform without exposing the _users DB password? |
Some work needs to be done before this is compatible with Node. I'm trying to use it with Electron; while logging in may work the session() call does not change away from the anonymous (name: null) user. Chromium Developer Tools > "Application" Tab > Cookies shows nothing between this and pouchdb-auth but the latter is holding the session after refreshes. |
Here's @koofah 's link correct URL: #130 Some good tips there. Though I'm not sure it's the best option, here's how I managed (running at NodeJS -- check the link for running at browser):
|
…orrectly set ajax request's body for login
…orrectly set ajax request's body for login
Hey there! I've been trying to figure out how to make my authentication for the past few days with no luck. I'm currently hosting my application on localhost without HTTPS. Using db.signup() works as intended but entering the same credentials into db.login() returns this:
My current code file is this: https://gist.github.com/JelaniThompson/1ca4564a163c83f905d2d5fc9f2b4a1f
I think my issue is that my password is returning plain text instead of a matching salt. How would I be able to solve this?
The text was updated successfully, but these errors were encountered: