Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error:unauthenticated is not triggered while using the app #413

Closed
rogeriochaves opened this issue Oct 29, 2015 · 4 comments
Closed

error:unauthenticated is not triggered while using the app #413

rogeriochaves opened this issue Oct 29, 2015 · 4 comments

Comments

@rogeriochaves
Copy link
Member

Hello,

So, I create a new instance of hoodie (new Hoodie('HOODIE_URL')) when the page is loaded, and I listen to error:unauthenticated events, but apparently this event is only triggered when the session is expired and the user reloads the page.

I put my couchdb session to expire in 15s just to test, and when the user is using the app, after 15s, the data syncing starts to throw 401s, and the user can't logout, but no error:unauthenticated is triggered, only if I reload the page.

Thanks!

@gr2m
Copy link
Member

gr2m commented Oct 29, 2015

Hey @rogeriochaves, that will be resolved with the new Hoodie that we are currently working on, I can't say when it's ready to play with, but we are making great progress. Is this a big issue for you or can it wait for the new Hoodie?

@rogeriochaves
Copy link
Member Author

It's not a big issue right now, thanks for the concern.

Is this already on the next branch or is something planned?

@gr2m
Copy link
Member

gr2m commented Oct 29, 2015

This specific part is not yet implemented. We'll need to implement it in https://github.com/hoodiehq/hoodie-client. When ever there is an "unauthenticated" error in the hoodie.store module, we should call account.get(), which then should also fail and then emit the error:unauthenticated event on hoodie.account, as documented here: https://github.com/hoodiehq/account-client

@boennemann
Copy link
Member

moved over hoodiehq/hoodie-client#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants