Couchbase or Sync Gateway

if you use sync gateway 1.5 or higher, you can use Couchbase directly by enable XATTRs. FYI

if you enable XATTRs, the changed from Couchbase directly will trigger the channel allocation with sync gateway, and you can use N1QL to get/update document. but it will ignore the require* function .
FYI and this

Couchbase server only store user info, if you want to your app and web the same user certificate, you should use Sync Gateway authentication mechanism . you can Custom Authentication with this guide.