Comments (3)
No worries, thanks for reporting. There should have been a Validation Error as answer, not a 200: request processed
. The example part is a bit outdated anyway's, I'll update it together with my fix.
from couch-auth.
Hi,
If you want to use application/x-www-form-urlencoded
your request would need to look like this, which works for me with your setup:
curl --request POST \
--url http://localhost:3000/auth/register \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode '[email protected]' \
--data-urlencode 'password=bigsecret' \
--data-urlencode 'confirmPassword=bigsecret'
Or you can simply use application/json
instead:
curl --request POST \
--url http://localhost:3000/auth/register \
--header 'Content-Type: application/json' \
--data '{"email": "[email protected]", "password": "bigsecret", "confirmPassword": "bigsecret"}'
Nevertheless, I should add some logs and return an error if the validation fails with anything else than an email being in use.
from couch-auth.
I works perfectly now and I feel pretty stupid for mixing urlencoded with my json object 😓
Would you welcome a pull request to make the Readme a bit more verbose/exhaustive around this part ?
from couch-auth.
Related Issues (20)
- Cloudant example HOT 4
- 🐛 IDs of session tokens removed by `cleanupExpired` aren't documented in `inactiveSessions`
- ✨ Make session time more flexible
- Having issue to retrieve user information after success user create HOT 2
- Extract the core functionality into a separate package
- Internationalization support for the nunjucks templates HOT 2
- Add the user's UUID to the roles of the docs in _users
- Mailer option not working with nodemailer-ses-transport HOT 2
- Re-introduce redis as optional session adapter
- Automatically resolve session creation conflicts HOT 2
- Less 3rd party dependencies, less declarative user/password model
- Unexpected behavior when email has uppercase letters HOT 1
- Handle case that user wants to change his email into one that already exists
- requireAuth middleware deletes genuine couchdb users from _users when their username is in an Authorization: Bearer header HOT 1
- Unhandled SMTP error when sending confirmation email in createUser() HOT 2
- Password change request where new password doesn't meet criteria results in 500 error
- Make username validation configurable or less restrictive HOT 1
- Incorrect type for `SlLoginSession.profile`
- This is incredible. HOT 1
- Document update conflict upon login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couch-auth.