On Jun 14, 2014, at 11:52 AM, CouchbaseLover <[email protected]> wrote:
> First off i think an apology is in order, sorry for my behaviour :)
Thanks for apologizing; all forgiven :) I understand the kind of frustration
you're having.
> The end result is that we want a simple Login/Register with Email&Password
> and that works with continuous. ...
> Ok so to really succeed i think you need to tell me what's needed to make it
> work from A-Z with Email&Password + continuous if you don't mind.
OK. I outlined this on another thread but I'll go into more detail here. The
short answer is that if you want to register username/password accounts you'll
need to write a small bit of server-side code to do it.
Registration:
User enters desired credentials in your app's UI.
App sends these to a custom server-side script, probably via a POST.
Server-side script calls the Gateway's admin API with a PUT /db/username to
register the user.
Login:
App prompts user for username/password.
2. App creates an NSURLCredential with the username/password, sets its
persistence to permanent, and registers it with the NSURLCredentialStore.
At launch time:
If this is the first launch, prompt the user to register or log in.
Otherwise, start replications, adding observers to watch their status.
If replication fails with a 401 status, run the login phase again.
Does that make sense? As I said earlier, step 3 of Registration is the only
custom server-side code you need to write, and it's pretty simple.
Eventually it would be good to add registration to the Gateway as a feature.
Looking back, I think the reasons we didn't add it in 1.0 are (a) enterprise
users don't need it, and (b) a lot of people (like me) hate registering yet
another username and password to use an app, so a solution like Persona seems a
much better alternative.
--Jens
--
You received this message because you are subscribed to the Google Groups
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/mobile-couchbase/5D88A845-D773-4393-BB53-9559E2321EA4%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.