Hi Paul,
this looks great! Basically, you can submit credentials with the HTTP
request and even keep cookies between requests from another server. So yes,
logging in via POST and keeping the cookie could work when turning on this
behavior in angular (which passes down to XHR):
mymodule.config(function ($httpProvider)
{$httpProvider.defaults.withCredentials=true;});
I did try this against Tomcat on another occasion (so Tomcat port 1,
http-server with angular port 2) and it did work - there, it was a POST to
login (like in Couch: there it's a POST to _session) and with above
setting, the login gets submitted with each further request
Hope this works / helps - let us know!
Best
Sebastian
On Sat, Feb 20, 2016 at 6:06 PM, Paul Hammant <[email protected]> wrote:
> I think it qualifies as "serverless", but not as a CouchApp (if it does I
> will head off to that mail list instead of this one)
>
> A HTML+SVG app speaks to Couch via CORS, and is otherwise hosted on
> GithubPages. Someone might be interested:
>
> http://paulhammant.com/2015/12/21/angular-and-svg-and-couchdb/
>
> Next up, allow the seat information without authentication, but log in to
> Couch, if a change is wanted. I think that's possible with Couch, but I
> have a grand total of six hours experience with it. Thoughts?
>
> - Paul
>