Getting current user information from CouchDB? -
How do you obtain information about the current user while navigating the app from the CouchDB database? I need this information to query the right data for every information. For example, in Rail, it is normal to use a filter in advance, which sets a variable named current_user with every request.
After successfully launching the session, with the post / _session, I tried the efforts suggested by the following Cochindi docs, but this does not return the full user document with the email and other fields needed. I also tried to request user documentation from the ID, but I am getting an error. Error: Any help would be greatly appreciated . I found this work by adding two requests: GET '/ _session ' GET' /_users/org.couch.user: '+ responseFromFirst.userCtx.name GET / _session
get /_users/org.couch.user:< Name & gt;
{error: not_found, reason: missing}
Comments
Post a Comment