Closed RobDixonIII closed 3 years ago
Also save the token expiration indicated by the timestamp expires_at, and have the API also respect that expiration.
Some good practices when incorporating the API and state: https://www.telerik.com/blogs/10-good-practices-building-maintaining-large-vuejs-projects
Use
https://github.com/Amareis/another-rest-clienthttps://robsontenorio.github.io/vue-api-query/ to make API calls.The first API call will be to /login upon successful authentication. Take the results of that call and store them in state. On every page other than /login and /accept-invitation, if User or Login is null or either of the Login properties are null, logout and redirect to /login.