Query /api/user and consider the user logged in if 200; not logged in if 401. Also use profile information from that endpoint.
Option 2
Store login status / profile information in local storage, along with an expiration date. Upon receiving a 401 at any endpoint, consider user logged out.
Option 1
Query
/api/user
and consider the user logged in if200
; not logged in if401
. Also use profile information from that endpoint.Option 2
Store login status / profile information in local storage, along with an expiration date. Upon receiving a
401
at any endpoint, consider user logged out.