colinskow / superlogin

Powerful authentication for APIs and single page apps using the CouchDB ecosystem which supports a variety of providers.
MIT License
370 stars 116 forks source link

Step-by-step how to guide (feature request) #103

Open heyconor opened 8 years ago

heyconor commented 8 years ago

I'm struggling to get superlogin to work with my Cloudant database (hosted on IBM Bluemix). Perhaps my knowledge of node.js isn't up to par, however I feel the superlogin documentation does not provide me with enough information on how to connect to Cloudant. When trying to register a user, I get status 400 (bad request) responses stating I have invalid UTF-8 JSON.

A quick "How to connect Superlogin to Cloudant" would be appreciated :)

I'm currently developing on the Ionic Framework which uses Angular 2. The following is a link to a good tutorial for using Superlogin with a local CouchDB instance, however I have failed in my numerous attempts to modify this for Cloudant:

http://www.joshmorony.com/part-2-creating-a-multiple-user-app-with-ionic-2-pouchdb-couchdb/

colinskow commented 8 years ago

SuperLogin is designed to work out of the box with Cloudant. All you have to do is set dbServer.cloudant to true in your config. Then under model set the Cloudant Permissions you want to give users by default for each database type.

Also take a look at SuperLogin Demo it works with Cloudant out of the box. The live demo is running on Cloudant.

I should emphasize it more in the README that most of the documentation is commented in the example config file. That goes over all the possible options.