User registration and email confirmation on CouchDB

407 views
Skip to first unread message

Pulkit Singhal

unread,
Jan 24, 2013, 9:51:22 PM1/24/13
to couchd...@apache.org
What are some good external tools / processes that can be integrated with
the _users DB for CouchDB and used to send out confirmation emails for new
user registrations?

Jeff Charette

unread,
Jan 24, 2013, 10:36:00 PM1/24/13
to us...@couchdb.apache.org, couchd...@apache.org
I second that question. I've always thought I would build a external service in node or PHP when I got there, but it would be nice to use a service that handles newsletter style mail outs as well with large contact lists and archiving of HTML versions. Maybe a analytics API as well to get bounce rate and such. Thoughts anyone?

Jeff Charette | Principal
We Are Charette
web / identity / packaging

m 415.298.2707
w wearecharette.com
e jef...@wearecharette.com

Travis Paul

unread,
Jan 24, 2013, 10:51:24 PM1/24/13
to us...@couchdb.apache.org
I do the same - write an external service (usually node). I would also love
to know if there is a better way.

Pulkit Singhal

unread,
Jan 24, 2013, 11:03:25 PM1/24/13
to us...@couchdb.apache.org
I'm still waiting for someone to tell me that they've already done it or an
open source package on github exists. But in case that's not gonna happen,
I'm thinking that somehow using Node to watch over CouchDB and send emails
via http://documentation.mailgun.net/user_manual.html#sending-via-api would
be good.

Honestly if it could be as integrated (as Futon) for new user signups and
email confirmation, that would be just awesome. So I'm still sitting here
waiting fingers crossed to hear someone say that they've done it before!

Wordit

unread,
Jan 25, 2013, 12:18:05 AM1/25/13
to us...@couchdb.apache.org
On Fri, Jan 25, 2013 at 5:03 AM, Pulkit Singhal <pulkit...@gmail.com> wrote:
> I'm still waiting for someone to tell me that they've already done it or an
> open source package on github exists.

A big "Me too" on this one. I'm also considering node rather than PHP
this time around.

Marcus

Tiger Nassau Inc

unread,
Jan 25, 2013, 11:25:11 AM1/25/13
to us...@couchdb.apache.org
Yes it is the job of the language not the db - you could hook up node (or php or python,...) to listen for db changes then use a mail pkg like haraka in node - mikeal rogers talked about this in berlin but have not seen any good code examples in this - we are looking at this using php slim

Sent from my LG Mobile

Pulkit Singhal <pulkit...@gmail.com> wrote:

>I'm still waiting for someone to tell me that they've already done it or an

Brad Rhoads

unread,
Jan 25, 2013, 11:24:20 AM1/25/13
to us...@couchdb.apache.org

pulkit...@gmail.com

unread,
Jan 25, 2013, 12:05:54 PM1/25/13
to us...@couchdb.apache.org, us...@couchdb.apache.org
Thank You! BrowserId github project by Jason is good but it doesn't handle the email confirmation use case that I asked about, so the search continues :)

Sent from my iPhone

Wordit

unread,
Jan 25, 2013, 6:17:59 PM1/25/13
to us...@couchdb.apache.org
On Fri, Jan 25, 2013 at 6:05 PM, <pulkit...@gmail.com> wrote:
> Thank You! BrowserId github project by Jason is good but it doesn't handle the email confirmation use case that I asked about, so the search continues :)

BrowserId does email confirmation at signup. The account is not active
until the email address has been confirmed. How is your use case
different? Is there something additional you need?

Marcus

Pulkit Singhal

unread,
Jan 25, 2013, 7:27:49 PM1/25/13
to us...@couchdb.apache.org
@ Marcus - Thank you for your strong affirmation. I suppose I might have
let the lack of "we have email confirmation" being spelled out on the main
read me page, throw me off.

I will go have a closer look, thank you. Will report back here if something
is still not fitting with what I had originally asked.

Jens Alfke

unread,
Jan 25, 2013, 8:11:51 PM1/25/13
to us...@couchdb.apache.org

On Jan 25, 2013, at 4:27 PM, Pulkit Singhal <pulkit...@gmail.com> wrote:

> @ Marcus - Thank you for your strong affirmation. I suppose I might have
> let the lack of "we have email confirmation" being spelled out on the main
> read me page, throw me off.

BrowserID addresses _are_ email addresses, and the authentication is based on verifying ownership of the address. So any ID you get through BrowserID login is a verified email address.

BrowserID is very cool; I’ve been adding support to TouchDB and the Couchbase Sync Gateway (aka BaseCouch).

—Jens

Jim Klo

unread,
Jan 25, 2013, 8:24:31 PM1/25/13
to <user@couchdb.apache.org>
FWIW:  BrowserID is now Mozilla Persona… and it is very awesome… especially if you understand how the security works by making it impossible for your IDP to track where you are logging in at (as opposed to OpenID and OAuth).

I use the plugin for my project (Learning Registry), however I strongly recommend that you NOT use the included browserid.js in your CouchApps or web apps, and link to the one provided by Mozilla.  They change it frequently enough that I've had it break authentication on more than one occasion which which required hacking the plugin.  The include is available via http and https.

- Jim

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

On Jan 25, 2013, at 5:11 PM, Jens Alfke <je...@couchbase.com>
 wrote:

Wordit

unread,
Jan 25, 2013, 9:59:26 PM1/25/13
to us...@couchdb.apache.org
Does anyone know why the BrowserID callback for couchdb doesn't work
as the docs say?

(I'm using it on iriscouch. I take it this plugin can be installed on
any couch? See https://github.com/iriscouch/browserid_couchdb )

This works:

$.couch.browserid.login();

The callback function does not react at all though. No UI action, no
console messages in Chrome or FF with Firebug:

$.couch.browserid.login(function(event, error, user) {
if(error)
return console.log("Something went wrong with login: " + error);

console.log("Congratulations " + user.email + ", you now have an
account on my couch");
});


Marcus

Jason Smith

unread,
Jan 26, 2013, 4:00:47 AM1/26/13
to us...@couchdb.apache.org
Hi, Marcus. It is possible this is a bug in the plugin. Do you have your
application published somewhere? I would like to look at it.

Alternatively, if your code is private, we can work on this together
privately since you are an Iris Couch user.

Thanks.
--
Iris Couch

Wordit

unread,
Jan 27, 2013, 8:29:05 PM1/27/13
to us...@couchdb.apache.org
Hi Jason,

Here's a separate minimal couchapp with only two buttons. One with,
one without a callback following BrowserId login. You'll see there's
no reaction and no console messages from the callback version.

http://wordit.iriscouch.com/browserid/_design/browserid/index.html

I copied and pasted the callback code from the readme.

Thanks,

Marcus
Reply all
Reply to author
Forward
0 new messages