I am developing mobile apps(IOS), I have read couchDB documentation to access it using HTTP Api, But
1.how do I implement user sign up,user sign in,email verification? just like parse.com is doing.
My plan is to create a database with users and each document would be having username, password, first name, last name, isemailverified, some user preferences with some more key- values.
The is the challenge I face:
2.In case someone queries on UserDatabase, and if the query is a query not related to the current user, I should reject the query. To overcome this challenge I need to write server-side code with pre-post query validation methods. Where should I deploy or start writing this code?
Please feedback on the way my strategy is and where do I need to improve this?
I will be interacting with my backend using restful interface.
User management in CouchDB can be done through a special _users
database. It's geared towards keeping login and end-user data in a special database, and it already implements some of what you need.
Cloudant has its own set of security features more geared towards the concept of "database users" than "application users". You use these to generate one or more API keys, granting varying levels of access to your data. This is geared towards having one or more backends sitting between your clients and your data. See also: this and this.
You can opt to use CouchDB security features on Cloudant, but several important bits are missing. The _users
database in Cloudant is compatible with CouchDB 1.1.x. See the implications of this here.
Thanks to this lack of support for features released in 2012/13, a two-tier architecture is hard to accomplish on Cloudant, no matter what they say. It will be hard to avoid having a backend sit between the client (browser, mobile app, etc) and the database. But that's something you'll need eventually, if you want to send emails, etc.
For a backend that does just that, a Node.js app hosted Bluemix is an excellent choice. An alternative might be that same app hosted on Azure, US West (you can collocate Cloudant there).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With