forcecraft / aion

An e-learning platform written in Elixir and Elm based on real-time gameplay
6 stars 0 forks source link

fix(elm): Handle 401 responses from server #212

Closed mrapacz closed 6 years ago

mrapacz commented 6 years ago

Summary This PR logs the user out when the token present in local storage is not valid (401 responses).

Related issues closes: #211

Test plan

  1. Change token validity settings in config.exs to ~10 seconds.
  2. Log in, wait for the token to become invalid.
  3. Try triggering an HTTP request to the backend.
  4. Watch the redirect.