NYCPlanning / deprecated-labs-zap-api

Deprecated version of the ZAP API, see https://github.com/NYCPlanning/labs-zap-api
Other
5 stars 3 forks source link

Frontend believes it's authenticated when the backend says it's not #220

Closed allthesignals closed 4 years ago

allthesignals commented 4 years ago

We're running into a situation possibly with expirations in which the frontend thinks it's auth'd after subsequent reloads, but it's actually not. The server request works because it returns data even if the filter flag for the user is enabled.

allthesignals commented 4 years ago

I think this is what's happening: the HTTP Only cookie expires, but ember simple auth isn't able to tell that it's expired, and so it thinks it's still authenticated.

We need to look into strategies for getting this to work correctly. Either the /users?me=true endpoint needs to invalidate something or ember-simple-auth is aware of the expiration time stamp in the local storage