couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: Require login to see any data in a CouchApp?
Date Wed, 31 Mar 2010 18:41:01 GMT

On Mar 31, 2010, at 11:34 AM, Zachary Zolton wrote:

> Howdy,
> 
> So, I'm building a CouchApp where I want only logged in users to be
> able to see any data. My problem is that if I add a role to the reader
> list in the DB security object, the user can't see my login page
> (which is just an HTML attachment on my ddoc), since any requests on
> that database result in a unauthorized error.
> 
> Two workarounds:
> 
> 1) have an app-layer middle layer (i.e. Sinatra, Node.JS, PHP, etc) to
> which I say "boo"
> 
> 2) have a second database + couchapp (without readers restriction) to
> handle the login page, but that sounds like too much hassle
> 

#2 is the only way I can think of.

Users's won't know that the login screen is hosted from a public db. They just follow links.

> Any better ideas?
> 
> 
> Cheers,
> 
> Zach
> 
> P.S. will release to github soon!


Mime
View raw message