On Saturday, June 14, 2014 2:34:53 PM UTC-7, Jens Alfke wrote:
>
>
> 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:
>
>    1. User enters desired credentials in your app’s UI.
>    2. App sends these to a custom server-side script, probably via a POST.
>    3. Server-side script calls the Gateway’s admin API with a PUT /db/
>    *username* to register the user.
>
> I think Jens means /db/_user/username 
<http://developer.couchbase.com/mobile/develop/guides/sync-gateway/administering-sync-gateway/authorizing-users/index.html#accounts>
 

I agree it would be cool to have more support for sign-up built into Sync 
Gateway.
 

>
> Login:
>
>    1. 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:
>
>    1. If this is the first launch, prompt the user to register or log in.
>    2. Otherwise, start replications, adding observers to watch their 
>    status.
>    3. 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/ab770855-da8a-4887-b9fb-bd25b554ee5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to