Hi,
I'm having trouble to undersstand how I would build a middleware with the parse Javascript sdk to protect certain sites.
When logging a user in a token is set in local Storage. But how can I access it and when do I know that it needs to be destroyed?
Of course I could set a variable isAuthenticated when successfiully logging in but I don't think that is the way it should work/is secure.