topicquests / tqks-featherweight-prototype

Quasar Feathers Structured Conversation
Apache License 2.0
16 stars 9 forks source link

Need to clear localStorage after logging out #76

Closed KnowledgeGarden closed 5 years ago

KnowledgeGarden commented 5 years ago

Code in /src/auth.js says this when a user authenticates:

localStorage.setItem('tqks-auth', response.accessToken)

but no code anywhere else says

localStorage.setItem('tqks-auth', '')

That should occur when the user logs out. Actually, in the long run, it could be more sophisticated than that: a timer watches user activity and starts when the user backs away from engagement; if the timer times out, the user is logged out and the localStorage cleared. Perhaps that's for later.

KnowledgeGarden commented 5 years ago

Actually localStorage.removeItem(key) is appropriate