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 #27

Open
boennemann opened this issue Nov 26, 2015 · 1 comment
Open

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

boennemann opened this issue Nov 26, 2015 · 1 comment

Comments

@boennemann
Copy link
Member

via @rogeriochaves hoodiehq/hoodie-server#413


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 Nov 26, 2015

As soon as we have the new account & store modules glued together in hoodie-client, I'd suggest we make an integration tests to assure that hoodie.on("account:error:unauthenticated", handler) gets triggered when hoodie.on("store:error:unauthenticated", handler) gets triggered, to prevent this from happening in future

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

2 participants