-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
@@ -21,7 +21,8 @@ | |||
"pouchdb": "^5.3.1", | |||
"pouchdb-find": "^0.9.0", | |||
"promise-polyfill": "polymerlabs/promise-polyfill#^1.0.0", | |||
"carbon-storage": "git@github.com:polymerelements/carbon-storage.git" | |||
"carbon-storage": "git@github.com:polymerelements/carbon-storage.git", | |||
"pouchdb-authentication": "^0.5.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This is looking great. I kind of want us to add a test, but I'm not sure there is a good way to do that without coming up with a creative way to stub a CouchDB server. So... let's merge it and move on with our lives :) |
inlined __getSession, made statics, renamed factory methods removed try catches with ifs, simplified error handling syntax
357500c
to
4075167
Compare
@cdata changed from carbon -> app, added documentation, and added an |
`app-pouchdb-auth-response` event will also be fired. If the response is an | ||
error response, `app-pouchdb-auth-error` event will also be fired. | ||
|
||
_Note: The `dbName` MUST point to the remote database._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be many remote databases; the
-> a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
<script> | ||
Polymer({ | ||
is: 'my-app-name', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At what point in the example implementation should the app attempt to log the user in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can put it in the authReadyChanged function, but I don't see any practical reason to statically log into a user.
d906330
to
02fe35e
Compare
@cdata That little deadlock fix seems to have RESOLVED everything. Get it? Resolve? Promises? Fine then, don't laugh. |
@rictic since Chris is out, do you mind taking a look at this PR? |
General usage:
.session
and.isLoggedIn
are both read-only. Tests have not been added in yet.If offline,
logout
will not delete session cookie, but this element's session object will reflect a logged-out session. (UI logout only)